// Use this for initialization void Start() { ghostCountText = gameOverghostCount.GetComponent <TextMeshProUGUI>(); cashCountText = gameOvercashCount.GetComponent <TextMeshProUGUI>(); timeCountText = gameOvertimeCount.GetComponent <TextMeshProUGUI>(); uiTimerText = uiTimer.GetComponent <TextMeshProUGUI>(); spawner = spawnerGameObject.GetComponent <Spawner>(); MainMenuCanvasGroup = MainMenuScreen.GetComponent <CanvasGroup>(); GameOverCanvasGroup = GameOverScreen.GetComponent <CanvasGroup>(); ControlsCanvasGroup = ControlsScreen.GetComponent <CanvasGroup>(); MainMenuScreen.SetActive(true); GameOverScreen.SetActive(false); ControlsScreen.SetActive(false); ccmuigi = muigi.GetComponent <CharacterController_Luigi>(); ResetCanvas(GameOverCanvasGroup); ResetCanvas(ControlsCanvasGroup); EnableCanvas(MainMenuCanvasGroup); }
private void Start() { parentClass = transform.parent.GetComponent <CharacterController_Luigi>(); }