Example #1
0
 public override void OnStateUpdate()
 {
     if (Input.GetKeyDown(KeyCode.Escape))
     {
         hub.SwitchToPauseMenu();
     }
 }
Example #2
0
    public override void OnStateUpdate()
    {
        if (Input.GetKeyDown(KeyCode.Escape))
        {
            hub.SwitchToPauseMenu();
        }

        if (player == null)
        {
            player = GameObject.Find("Main Player")?.GetComponent <PlayerController>();
        }
    }