private void Awake() { if (instance == null) { instance = this; } }
private void Awake() { DontDestroyOnLoad(this.gameObject); escMenu = GameObject.FindWithTag("EscMenu") .GetComponent <EscMenuView>(); }
void Start() { CurrentState = State.Run; isGameOver = false; Player.GetComponentInChildren <PlayerScript>().MinigameStarted += StartMinigame; GameStateUpdated += SwitchInterface; fpc = PlayerController.GetComponent <FirstPersonController>(); fpc.LockCursor(true); emv = EscMenu.GetComponent <EscMenuView>(); emv.BackButtonClicked += BackToGame; }