private void MakeSingelton() { if (instance == null) { instance = this; } }
private void Start() { Cursor.lockState = CursorLockMode.Locked; Cursor.visible = false; player = GameObject.FindGameObjectWithTag(Tags.PLAYER).transform; playerMovement = player.GetComponent <CharacterMovement>(); healthController = player.GetComponent <UniversalHealthController>(); // this makes sure that we inform game manager that we are in gameplay scene // so we can enable and disable pause menu GameManager.instance.gameState = GameState.RUNNING; missionUI = MissionManagerUI.instance; restartBtn.onClick.AddListener(() => RestartGameOnCheckPoint()); quitBtn.onClick.AddListener(() => QuitToMainMenu()); }