예제 #1
0
class AnimationBank:
    animation_by_str = {
        "stand": Stand(),
        "run": Run(),
        "melee_attack_1": MeleeAttack1(),
        "melee_attack_2": MeleeAttack2(),
        "magic_attack_1": MagicAttack1()
    }

    @classmethod
    def get_animation_by_string(cls, string):
        assert string in cls.animation_by_str, f"Animation {string} not found"
        return cls.animation_by_str[string]
예제 #2
0
class DarkElf(ConfiguredActor):

    MODEL_PATH = "local/assets/characters/dark-elf.gltf"
    HEIGHT = 0.55
    ANIMATION_MAPPING = {
        Stand(): "wait_2HS_FDarkElf",
        Run(): "run_2HS_FDarkElf",
        MeleeAttack1(): "Atk01_2HS_FDarkElf",
        MeleeAttack2(): "SpAtk001_2HS_FDarkElf",
        MagicAttack1(): "CastMid_FDarkElf",
    }

    def configure(self):
        self.set_play_rate(3, self.ANIMATION_MAPPING[MeleeAttack1()])
        self.set_play_rate(2, self.ANIMATION_MAPPING[MeleeAttack2()])
        self.set_play_rate(3, self.ANIMATION_MAPPING[MagicAttack1()])
예제 #3
0
class Kamael(ConfiguredActor):

    MODEL_PATH = "local/assets/characters/kamael.gltf"
    HEIGHT = 0.57
    ANIMATION_MAPPING = {
        Stand(): "wait_2HS_MKamael",
        Run(): "run_2HS_MKamael",
        MeleeAttack1(): "Atk01_2HS_MKamael",
        MeleeAttack2(): "SpAtk001_2HS_MKamael",
        MagicAttack1(): "CASTmid_D_MKamael",
    }

    def configure(self):
        self.set_play_rate(3, self.ANIMATION_MAPPING[MeleeAttack1()])
        self.set_play_rate(3, self.ANIMATION_MAPPING[MeleeAttack2()])
        self.set_play_rate(3, self.ANIMATION_MAPPING[MagicAttack1()])
예제 #4
0
 def configure(self):
     self.set_play_rate(0.2, self.ANIMATION_MAPPING[Stand()])
     self.set_play_rate(3, self.ANIMATION_MAPPING[MeleeAttack1()])
     self.set_play_rate(2, self.ANIMATION_MAPPING[MeleeAttack2()])
     self.set_play_rate(3, self.ANIMATION_MAPPING[MagicAttack1()])