public void SetAnimation(PlayerAnimationsEnum currentPlayerAnimationEnum)
        {
            CurrentPlayerAnimationEnum = currentPlayerAnimationEnum;
            switch (currentPlayerAnimationEnum)
            {
            case PlayerAnimationsEnum.Idle:
                FramesLimit = IdleFrames;
                break;

            case PlayerAnimationsEnum.Move:
                FramesLimit = moveFrames;
                break;

            case PlayerAnimationsEnum.GetDamage:
                FramesLimit = damageFrames;
                break;

            case PlayerAnimationsEnum.Attack:
                FramesLimit = attackFrames;
                break;

            case PlayerAnimationsEnum.Explosion:
                FramesLimit = explosionFrames;
                break;

            case PlayerAnimationsEnum.Teleport:
                FramesLimit = teleportFrames;
                break;

            case PlayerAnimationsEnum.Converting:
                FramesLimit = converterFrames;
                break;
            }
        }
Esempio n. 2
0
 public void SetAnimation(PlayerAnimationsEnum currentAnimationEnum)
 {
     PlayerAnimator.SetAnimation(currentAnimationEnum);
 }
Esempio n. 3
0
 private void SubstractPlayerHp(int value, PlayerAnimationsEnum animationEnum)
 {
     SubstractPlayerHp(value);
     SetAnimation(animationEnum);
 }