Exemplo n.º 1
0
    def __init__(self, *args, **kwargs):
        self.left = c.IMG("bigboostandleft.png")
        #TODO, realign boo, too far right
        #         self.center_floating_player(self.left)
        self.left_seq = c.GRID(self.left, 1, 1)
        self.left_anim = c.ANIM(self.left_seq, 1, False)
        self.walk_right = c.IMG("bigboowalkright.png")
        self.walk_right_seq = c.GRID(self.walk_right, 1, 1)
        self.walk_right_anim = c.ANIM(self.walk_right_seq, 0.1, True)
        self.walk_left = c.IMG("bigboowalkleft.png")
        self.walk_left_seq = c.GRID(self.walk_left, 1, 1)
        self.walk_left_anim = c.ANIM(self.walk_left_seq, 0.1, True)

        super().__init__(self.left, *args, **kwargs)
        self.x = c.OFF_SCREEN_R
        self.y = c.FLOAT_H
        self.batch = c.PLAYER_BATCH
        self.scale = 1.5

        #TODO, figure out why this method only works if within the __init__ block
        def mini_sprite(self) -> Any:
            """Makes mini-sprite version of self. Overrides base class method."""
            mini = Score(self)
            mini.image = self.walk_left_anim
            return mini
Exemplo n.º 2
0
 def __init__(self, *args, **kwargs):
     self.right = c.IMG("yoshicoinright.png")
     self.right_seq = c.GRID(self.right, 1, 5)
     self.right_anim = c.ANIM(self.right_seq, 1, True)
     self.left = c.IMG("yoshicoinleft.png")
     self.left_seq = c.GRID(self.left, 1, 5)
     self.left_anim = c.ANIM(self.left_seq, 0.1, True)
     super().__init__(self.right_anim, *args, **kwargs)
Exemplo n.º 3
0
 def __init__(self, *args, **kwargs):
     self.right = c.IMG("spinybeetlestandright.png")
     self.right_seq = c.GRID(self.right, 1, 1)
     self.right_anim = c.ANIM(self.right_seq, 1, False)
     self.left = c.IMG("spinybeetlewalkleft.png")
     self.walk_left_seq = c.GRID(self.left, 1, 2)
     self.walk_left_anim = c.ANIM(self.walk_left_seq, 0.1, True)
     self.walk_right = c.IMG("spinybeetlewalkright.png")
     self.walk_right_seq = c.GRID(self.walk_right, 1, 2)
     self.walk_right_anim = c.ANIM(self.walk_right_seq, 0.1, True)
     self.left = self.right
     super().__init__(self.right, *args, **kwargs)
Exemplo n.º 4
0
    def __init__(self, *args, **kwargs):
        self.left = c.IMG("bigmolestandleft.png")
        self.left_seq = c.GRID(self.left, 1, 1)
        self.left_anim = c.ANIM(self.left_seq, 1, False)
        self.walk_right = c.IMG("bigmolewalkright.png")
        self.walk_right_seq = c.GRID(self.walk_right, 1, 2)
        self.walk_right_anim = c.ANIM(self.walk_right_seq, 0.1, True)
        self.walk_left = c.IMG("bigmolewalkleft.png")
        self.walk_left_seq = c.GRID(self.walk_left, 1, 2)
        self.walk_left_anim = c.ANIM(self.walk_left_seq, 0.1, True)

        super().__init__(self.left, *args, **kwargs)
        self.x = c.OFF_SCREEN_R
        self.y = c.WALK_H
        self.batch = c.PLAYER_BATCH
        self.scale = 1.5
Exemplo n.º 5
0
 def __init__(self, *args, **kwargs):
     self.right = c.IMG("powbutton.png")
     self.right_seq = c.GRID(self.right, 1, 1)
     self.right_anim = c.ANIM(self.right_seq, 1, False)
     self.left_anim = self.right_anim
     self.left = self.right
     super().__init__(self.right_anim, *args, **kwargs)
Exemplo n.º 6
0
 def __init__(self, x=0, y=0, *args, **kwargs):
     self.poof = c.IMG("poof.png")
     self.poof_seq = c.GRID(self.poof, 1, 4)
     self.poof_anim = c.ANIM(self.poof_seq, 0.1, False)
     super().__init__(self.poof_anim, *args, **kwargs)
     self.x = x
     self.y = y
     self.batch=c.ANIMATION_BATCH
Exemplo n.º 7
0
    def __init__(self, *args, **kwargs):
        self.left = c.IMG("bigmariostandleft.png")
        self.left_seq = c.GRID(self.left, 1, 1)
        self.left_anim = c.ANIM(self.left_seq, 1, False)

        #attempting to use slices from a main spritesheet.
        #         self.left = all_sprites.get_region(x=2, y=150, width=48, height=28)
        #         self.left_seq = c.GRID(self.left, 1, 3)
        #         self.left_anim = c.ANIM(self.left_seq, 1, True)

        self.walk_right = c.IMG("bigmariowalkright.png")
        self.walk_right_seq = c.GRID(self.walk_right, 1, 3)
        self.walk_right_anim = c.ANIM(self.walk_right_seq, 0.1, True)
        self.walk_left = c.IMG("bigmariowalkleft.png")
        self.walk_left_seq = c.GRID(self.walk_left, 1, 3)
        #         self.walk_left_seq = c.GRID(self.left, 1, 3)
        self.walk_left_anim = c.ANIM(self.walk_left_seq, 0.1, True)

        super().__init__(self.left, *args, **kwargs)
        self.x = c.OFF_SCREEN_R
        self.y = c.WALK_H
        self.batch = c.PLAYER_BATCH
        self.scale = 2
Exemplo n.º 8
0
    def __init__(self, *args, **kwargs):
        self.left = c.IMG("firelightwalkleft.png")
        self.left_seq = c.GRID(self.left, 1, 2)
        #         self.left_anim = c.ANIM(self.left_seq, 0.1, False)  #not animated while standing
        self.walk_right = c.IMG("firelightwalkright.png")
        self.walk_right_seq = c.GRID(self.walk_right, 1, 2)
        self.walk_right_anim = c.ANIM(self.walk_right_seq, 0.1, True)
        self.walk_left = c.IMG("firelightwalkleft.png")
        self.walk_left_seq = c.GRID(self.walk_left, 1, 2)
        self.walk_left_anim = c.ANIM(self.walk_left_seq, 0.1, True)
        self.left_anim = self.walk_left_anim

        super().__init__(self.left, *args, **kwargs)
        self.x = c.OFF_SCREEN_R
        self.y = c.FLOAT_H
        self.batch = c.PLAYER_BATCH

        def mini_sprite(self) -> Any:
            """Makes mini-sprite version of self. Overrides base class method."""
            mini = Score(self)
            mini.y -= 5  #readjusted for score_display only
            mini.image = self.left_anim
            return mini
Exemplo n.º 9
0
    def __init__(self, *args, **kwargs):
        self.right = c.IMG("yammystandright.png")
        self.action_right = c.IMG("yammyactionright.png")
        self.action_right_seq = c.GRID(self.action_right, 1, 2)
        self.action_right_anim = c.ANIM(self.action_right_seq, 0.2, False)
        self.disappear = False
        self.disappear_rate = 3
        self.max_opacity = 255
        self.min_opacity = 0

        super().__init__(self.right, *args, **kwargs)
        self.x = 30
        self.y = c.ITEM_PLATFORM_H
        self.batch = c.YAMMY_BATCH
        self.scale = 2
        self.opacity = 0
Exemplo n.º 10
0
 def __init__(self, *args, **kwargs):
     self.right = c.IMG("star.png")
     self.right_seq = c.GRID(img, 1, 1)
     self.right_anim = c.ANIM(self.right_seq, 1, False)
     self.left = self.right
     super().__init__(self.right_anim, *args, **kwargs)
Exemplo n.º 11
0
 def __init__(self, *args, **kwargs):
     self.right = c.IMG("questionblock.png")
     self.right_seq = c.GRID(self.right, 1, 4)
     self.right_anim = c.ANIM(self.right_seq, 1, True)
     self.left = self.right
     super().__init__(self.right_anim, *args, **kwargs)
Exemplo n.º 12
0
 def __init__(self, *args, **kwargs):
     self.right = c.IMG("pirahnaplantsmall.png")
     self.right_seq = c.GRID(self.right, 1, 2)
     self.right_anim = c.ANIM(self.right_seq, 0.1, True)
     self.left_anim = self.right_anim
     super().__init__(self.right_anim, *args, **kwargs)
Exemplo n.º 13
0
 def __init__(self, *args, **kwargs):
     self.right = c.IMG("greenmushroom.png")
     self.right_seq = c.GRID(self.right, 1, 1)
     self.right_anim = c.ANIM(self.right_seq, 1, False)
     self.left_anim = self.right_anim
     super().__init__(self.right_anim, *args, **kwargs)