예제 #1
0
    void AnimationUpdate(float sliderValue) // 애니메이션 업데이트
    {
        if (playerProperty.IsDead)
        {
            playerBehaviour.Animation(PlayerAnimation.Death);
            return;
        }

        if (!playerProperty.Attackable)
        {
            playerBehaviour.Animation(PlayerAnimation.Attack);
        }
        else if (sliderValue != 0 && !playerProperty.IsJump && !playerProperty.IsDead) // 슬라이더를 누르고 있을 때
        {
            playerBehaviour.Animation(PlayerAnimation.Walk);
        }
        else if (!playerProperty.IsJump && playerProperty.Attackable) // 점프 상태가 아니고 공격중이 아니라면
        {
            playerProperty.MoveState = MoveState.Idle;
            playerBehaviour.Animation(0);
        }
        else if (!playerProperty.IsDead && playerProperty.IsJump) // 점프 상태이면
        {
            playerBehaviour.Animation(PlayerAnimation.Jump);
        }
    }
 // 사수자리 클래스의 스킬을 구현
 public override void DoSkill()
 {
     if (CheckSkillAvailability())
     {
         playerBehaviour.Animation(PlayerAnimation.Attack);
         objectPool.ObjectPoolPop();
         Debug.Log("사수자리의 스킬 발동!");
         StartCoroutine(SkillActivation());
     }
 }