public override void OnStateUpdate() { if (Input.GetKeyDown(KeyCode.Escape)) { hub.SwitchToPauseMenu(); } }
public override void OnStateUpdate() { if (Input.GetKeyDown(KeyCode.Escape)) { hub.SwitchToPauseMenu(); } if (player == null) { player = GameObject.Find("Main Player")?.GetComponent <PlayerController>(); } }