오늘은 슈퍼점프에 대한 쿨타임을 적용시킬 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;
}
애니메이션 수정
'TIL (since 2023.08.07 ~ )' 카테고리의 다른 글
2023-11-14 TIL(Unity 최종 프로젝트 17일차) (0) | 2023.11.14 |
---|---|
2023-11-13 TIL(Unity 최종 프로젝트 16일차) (0) | 2023.11.13 |
2023-11-09 TIL(Unity 최종 프로젝트 14일차) (0) | 2023.11.09 |
2023-11-08 TIL(Unity 최종 프로젝트 13일차) (1) | 2023.11.08 |
2023-11-07 TIL(Unity 최종 프로젝트 12일차) (0) | 2023.11.07 |