Ejemplo n.º 1
0
    def __init__(self, player):
        animations = {
            'left': Animation(assets.images.player, ('jump_left', )),
            'right': Animation(assets.images.player, ('jump_right', ))
        }
        State.__init__(self, player, animations, .3, .5)

        self.name = None

        self.jumping_time = 0
Ejemplo n.º 2
0
 def __init__(self, player):
     animations = {
         'left':
         Animation(assets.images.player, ('walk_left_1', 'walk_left_2'),
                   200),
         'right':
         Animation(assets.images.player, ('walk_right_1', 'walk_right_2'),
                   200)
     }
     State.__init__(self, player, animations, .3, .5)
Ejemplo n.º 3
0
 def __init__(*args):
     State.__init__(*args)
Ejemplo n.º 4
0
    def enter(self):
        State.enter(self)

        self.jumping_time = 0
Ejemplo n.º 5
0
 def __init__(self, player):
     animations = {
         'left': Animation(assets.images.player, ('stand_left', )),
         'right': Animation(assets.images.player, ('stand_right', ))
     }
     State.__init__(self, player, animations, .3, .5)
Ejemplo n.º 6
0
 def exit(self):
     State.exit(self)
     
     self.entity.rect.size = self.entity.default_size
     self.entity.rect.move_ip(0, -28)
Ejemplo n.º 7
0
 def enter(self):
     State.enter(self)
     
     self.entity.rect.size = (42, 36)
     self.entity.rect.move_ip(0, 28)
Ejemplo n.º 8
0
 def __init__(self, enemy):
     animations = {
         'shell': Animation(assets.images.enemies.turtle, ('shell_front',))
     }
     
     State.__init__(self, enemy, animations)