본문 바로가기

TIL (since 2023.08.07 ~ )

2023-11-10 TIL(Unity 최종 프로젝트 15일차)

 

오늘은 슈퍼점프에 대한 쿨타임을 적용시킬 UI를 구현하고 플레이어를 조작하면서 어색하거나 예상치 못한 잔버그를 Animation을 통해 고치는 작업을 했다.

 

 

PlayerGroundState 수정

protected override void OnSuperJumpStarted(InputAction.CallbackContext context)
    {
        if (stateMachine.Player.Playerconditions.superJump.curValue < groundData.SuperJumpCost)
            return;
        stateMachine.ChangeState(stateMachine.SuperJump);
    }

 

 

Playerconditions 수정

public bool UseSuperJump(float amount)
    {
        if(superJump.curValue - amount <0)
            return false;

        superJump.Subtract(amount);
        return true;
    }

 

 

 

애니메이션 수정