示例#1
0
 def __init__(self, owner):
     self.RIFLE_RANGE = 4
     self.RIFLE_INIT_DAMAGE = 10
     self.AMMO_LIMIT = 6
     self.AMMO_RECHARGE = 3
     Weapon.__init__(self,self.RIFLE_RANGE, self.RIFLE_INIT_DAMAGE, owner)
     self.ammo = self.AMMO_LIMIT
示例#2
0
 def __init__(self,
              imageName=None,
              colorkey=None,
              clipRect=None,
              sound=None,
              soundVolume=1):
     Weapon.__init__(self, imageName, colorkey, clipRect, sound,
                     soundVolume)
     self.attackAngle = 0
     self.hip = math.sqrt(self.rect.w * self.rect.w +
                          self.rect.h * self.rect.h)
     self.melee = True
示例#3
0
	def __init__(self, x, y, speedX, speedY, imageName=None, colorkey=None, clipRect=None):
		Weapon.__init__(self, imageName, colorkey, clipRect)
		self.rect = Rect(x, y, 0, 0)
		self.speedX = speedX
		self.speedY = speedY
		self.atk = 5

		# Important if you want pinpoint accuracy
		self.floatX = float(self.rect.x)
		self.floatY = float(self.rect.y)

		self.angle = math.degrees(math.atan2(speedY, speedX))
		self.flipH = True
示例#4
0
 def __init__(self, canvas):
     Weapon.__init__(self, MISSILE_DMG, MISSILE_STAM, MISSILE_IMG, 
                     MISSILE_IMG_EXPL, MISSILE_FIRE, MISSILE_EXPL, MISSILE_SPEED, MISSILE_COOLDOWN, TYPE_M, canvas)
示例#5
0
文件: WpnLaser.py 项目: hmourit/Aleph
 def __init__(self):
     Weapon.__init__(self, "sw_weapons.png", -1, Rect(78, 24, 15, 18),
                     "laser_shot.wav", 0.5)
     self.sheetCoord[0].append(Rect(132, 21, 16, 20))
     self.cooldown = 0
示例#6
0
 def __init__(self, imageName=None, colorkey=None, clipRect=None):
     Weapon.__init__(self, imageName, colorkey, clipRect, "bow_shot.wav")
     self.cooldown = 0
示例#7
0
文件: Axe.py 项目: jaslioin/3180pvp
 def __init__(self, owner):
     self.AXE_RANGE = 1
     self.AXE_INIT_DAMAGE = 40
     Weapon.__init__(self, self.AXE_RANGE, self.AXE_INIT_DAMAGE, owner)
示例#8
0
 def __init__(self, canvas):
     Weapon.__init__(self, BOMB_DMG, BOMB_STAM, BOMB_IMG, 
                     BOMB_IMG_EXPL, BOMB_FIRE, BOMB_EXPL, BOMB_SPEED, BOMB_COOLDOWN, TYPE_B, canvas)
示例#9
0
	def __init__(self):
		Weapon.__init__(self, "items-1small.png", None, Rect(110, 120, 9, 11))
		self.cooldown = 0
示例#10
0
 def __init__(self):
     Weapon.__init__(self, "wpns-modern2.png", -1, Rect(48, 28, 24, 17),
                     "bullet_shot.ogg", 0.5)
     self.sheetCoord[0].append(pygame.Rect(82, 25, 26, 20))
     self.cooldown = 0
示例#11
0
文件: WpnBlade.py 项目: hmourit/Aleph
 def __init__(self, imageName=None, colorkey=None, clipRect=None, sound=None, soundVolume=1):
     Weapon.__init__(self, imageName, colorkey, clipRect, sound, soundVolume)
     self.attackAngle = 0
     self.hip = math.sqrt(self.rect.w * self.rect.w + self.rect.h * self.rect.h)
     self.melee = True
示例#12
0
 def __init__(self, canvas):
     Weapon.__init__(self, MAINGUN_DMG, MAINGUN_STAM, LASER_GREEN, 
                     LASER_BLUE, LASER_FIRE, LASER_EXPL, MAINGUN_SPEED, MAINGUN_COOLDOWN, TYPE_L, canvas)
示例#13
0
	def __init__(self, imageName=None, colorkey=None, clipRect=None):
		Weapon.__init__(self, imageName, colorkey, clipRect, "bow_shot.wav")
		self.cooldown = 0
示例#14
0
文件: WpnBite.py 项目: hmourit/Aleph
 def __init__(self, imageName=None, colorkey=None, clipRect=None, *args):
     Weapon.__init__(self, sound="wolf_bite.wav", soundVolume=0.5)
     self.melee = True
示例#15
0
文件: WpnBite.py 项目: hmourit/Aleph
 def __init__(self, imageName=None, colorkey=None, clipRect=None, *args):
     Weapon.__init__(self, sound="wolf_bite.wav", soundVolume=0.5)
     self.melee = True
示例#16
0
 def __init__(self):
     Weapon.__init__(self, "items-1small.png", None, Rect(110, 120, 9, 11))
     self.cooldown = 0
示例#17
0
	def __init__(self):
		Weapon.__init__(self, "sw_weapons.png", -1, Rect(78, 24, 15, 18), "laser_shot.wav", 0.5)
		self.sheetCoord[0].append(Rect(132, 21, 16, 20))
		self.cooldown = 0
示例#18
0
	def __init__(self):
		Weapon.__init__(self, "wpns-modern2.png", -1, Rect(48, 28, 24, 17), "bullet_shot.ogg", 0.5)
		self.sheetCoord[0].append(pygame.Rect(82, 25, 26, 20))
		self.cooldown = 0