Beispiel #1
0
 def update(self):
     self.rect.x += self.vel_x
     self.image = CortarImagen(star, self.i, 0, 2, 1)
     if self.i == 0:
         self.i = 1
     else:
         self.i = 0
Beispiel #2
0
 def update(self):
     self.rect.x += self.vel_x
     if self.action < 3:
         self.cut = CortarImagen(img_ball, self.action, 0, 3, 1)
         self.action += 1
         self.image = self.cut
     else:
         self.action = 0
 def update(self):
     if self.action < 4:
         self.cut = CortarImagen(img_wolf, self.action, 0, 5, 1)
         self.action += 1
         self.image = self.cut
     else:
         self.action = 0
     self.rect.x += self.vel_x
Beispiel #4
0
 def __init__(self):
     pygame.sprite.Sprite.__init__(self)
     self.cut = CortarImagen(screen, 0, 0, 1, 1)
     self.image = self.cut
     self.rect = self.image.get_rect()
     self.rect.x = 0
     self.rect.y = 0
     self.vel_x = 0
Beispiel #5
0
 def __init__(self, px, py):
     pygame.sprite.Sprite.__init__(self)
     self.cut = CortarImagen(img_ball, 0, 0, 3, 1)
     self.image = self.cut
     self.rect = self.image.get_rect()
     self.rect.x = px
     self.rect.y = py
     self.vel_x = 20
     self.action = 0
Beispiel #6
0
 def __init__(self, px, py):
     pygame.sprite.Sprite.__init__(self)
     self.i = 0
     self.cut = CortarImagen(star, 0, self.i, 2, 1)
     self.image = self.cut
     self.rect = self.image.get_rect()
     self.rect.x = px
     self.rect.y = py
     self.vel_x = 0
 def update(self):
     if self.action < 3:
         self.cut = CortarImagen(self.img_enemy, self.action, 0, 3, 1)
         self.action += 1
         self.image = self.cut
     else:
         self.action = 0
     self.coldown += 1
     self.rect.x += self.vel_x
	def __init__(self, px):
		pygame.sprite.Sprite.__init__(self)
		self.health = 300
		self.i = 0
		self.cut = CortarImagen(palomita, self.i, 0, 6, 1)
		self.image = self.cut
		self.rect = self.image.get_rect()
		self.rect.x = px
		self.rect.y = 80
		self.vel_x = -10
		self.disp = False
 def __init__(self, px, py):
     pygame.sprite.Sprite.__init__(self)
     self.health = 300
     self.cut = CortarImagen(img1, 1, 1, 7, 4)
     self.image = self.cut
     self.rect = self.image.get_rect()
     self.rect.x = px
     self.rect.y = py
     self.vel_x = 0
     self.vel_y = 0
     self.dir = True
     self.disp = False
     self.saltar = False
     self.is_jumping = False
     self.vel_in_platform = 0
     self.type_weapon = 1
Beispiel #10
0
 def __init__(self, img_enemy, px, py):
     pygame.sprite.Sprite.__init__(self)
     self.health = 500
     self.img_enemy = img_enemy
     self.cut = CortarImagen(self.img_enemy, 0, 0, 3, 1)
     self.image = self.cut
     self.rect = self.image.get_rect()
     self.rect.x = px
     self.rect.y = py
     self.vel_x = 0
     self.vel_y = 0
     self.dir = True
     self.disp = False
     self.saltar = False
     self.is_jumping = False
     self.vel_in_platform = 0
     self.action = 0
     self.coldown = 0
Beispiel #11
0
 def __init__(self, px, py):
     Enemies.__init__(self, px, py)
     self.cut = CortarImagen(img_wolf, 0, 0, 5, 1)
     self.image = self.cut
Beispiel #12
0
	def update(self):
		self.image = CortarImagen(palomita, self.i, 0, 6, 1)
		self.rect.x += self.vel_x
		if(self.i >=5):
			self.i = 0