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; } }
public void SetAnimation(PlayerAnimationsEnum currentAnimationEnum) { PlayerAnimator.SetAnimation(currentAnimationEnum); }
private void SubstractPlayerHp(int value, PlayerAnimationsEnum animationEnum) { SubstractPlayerHp(value); SetAnimation(animationEnum); }