Esempio n. 1
0
 def __init__(self, pos, type):
     super().__init__()
     self.frame_index = 0
     self.animation_speed = 0.5
     if type == 'jump':
         self.frames = import_folder('assets/character/dust_particles/jump')
     if type == 'land':
         self.frames = import_folder('assets/character/dust_particles/land')
     self.image = self.frames[self.frame_index]
     self.rect = self.image.get_rect(center=pos)
Esempio n. 2
0
    def __init__(self, pos, type):
        self.frame_index = 0
        self.animation_speed = 0.5
        if type == 'jump':
            self.frame = import_folder(
                "C:\\Users\\Matthew!\\PycharmProjects\\Platformer2\\character\\dust_particles\\jump"
            )

        if type == 'land':
            self.frame = import_folder(
                "C:\\Users\\Matthew!\\PycharmProjects\\Platformer2\\character\\dust_particles\\land"
            )
        self.image = self.frame[self.frame_index]
        self.rect = self.image.get_Rect(center=pos)
Esempio n. 3
0
    def import_character_assets(self):
        character_path = 'assets/character/'
        self.animations = {'idle': [], 'run': [], 'jump': [], 'fall': []}

        for animation in self.animations.keys():
            full_path = os.path.join(character_path, animation)
            self.animations[animation] = import_folder(full_path)
Esempio n. 4
0
    def import_character_assets(self):
        character_path = "C:\\Users\\Matthew!\\PycharmProjects\\Platformer2\\character\\"
        self.animations = {'idle': [], 'run': [], 'jump': [], 'fall': []}

        for animation in self.animations.keys():
            full_path = character_path + animation
            self.animations[animation] = import_folder(full_path)
Esempio n. 5
0
    def import_player_assets(self):
        character_path = '../graphics/player/'
        self.animations = {
            'up': [],
            'down': [],
            'left': [],
            'right': [],
            'right_idle': [],
            'left_idle': [],
            'up_idle': [],
            'down_idle': [],
            'right_attack': [],
            'left_attack': [],
            'up_attack': [],
            'down_attack': []
        }

        for animation in self.animations.keys():
            full_path = character_path + animation
            self.animations[animation] = import_folder(full_path)
Esempio n. 6
0
 def import_dust_run_particles(self):
     self.dust_run_particles = import_folder('assets/character/dust_particles/run')
Esempio n. 7
0
    def __init__(self):
        self.frames = {
            # magic
            'flame':
            import_folder('../graphics/particles/flame/frames'),
            'aura':
            import_folder('../graphics/particles/aura'),
            'heal':
            import_folder('../graphics/particles/heal/frames'),

            # attacks
            'claw':
            import_folder('../graphics/particles/claw'),
            'slash':
            import_folder('../graphics/particles/slash'),
            'sparkle':
            import_folder('../graphics/particles/sparkle'),
            'leaf_attack':
            import_folder('../graphics/particles/leaf_attack'),
            'thunder':
            import_folder('../graphics/particles/thunder'),

            # monster deaths
            'squid':
            import_folder('../graphics/particles/smoke_orange'),
            'raccoon':
            import_folder('../graphics/particles/raccoon'),
            'spirit':
            import_folder('../graphics/particles/nova'),
            'bamboo':
            import_folder('../graphics/particles/bamboo'),

            # leafs
            'leaf':
            (import_folder('../graphics/particles/leaf1'),
             import_folder('../graphics/particles/leaf2'),
             import_folder('../graphics/particles/leaf3'),
             import_folder('../graphics/particles/leaf4'),
             import_folder('../graphics/particles/leaf5'),
             import_folder('../graphics/particles/leaf6'),
             self.reflect_images(import_folder('../graphics/particles/leaf1')),
             self.reflect_images(import_folder('../graphics/particles/leaf2')),
             self.reflect_images(import_folder('../graphics/particles/leaf3')),
             self.reflect_images(import_folder('../graphics/particles/leaf4')),
             self.reflect_images(import_folder('../graphics/particles/leaf5')),
             self.reflect_images(import_folder('../graphics/particles/leaf6')))
        }
Esempio n. 8
0
 def import_dust_run_particles(self):
     self.dust_run_particles = import_folder(
         "C:\\Users\\Matthew!\\PycharmProjects\\Platformer2\\character\\dust_particles\\run"
     )