Null check on current state drawGizmos
This commit is contained in:
parent
d0d51a82f1
commit
41e7ddfd48
@ -30,7 +30,7 @@ public class PlayerMovement : MonoBehaviour {
|
||||
SwitchState(newState);
|
||||
}
|
||||
|
||||
void OnDrawGizmos() => currentState.OnDrawGizmos();
|
||||
void OnDrawGizmos() => currentState?.OnDrawGizmos();
|
||||
|
||||
public void OnMove(InputAction.CallbackContext ctx) {
|
||||
moveDirection = ctx.ReadValue<Vector2>();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user