void Awake() { Time.timeScale = 1f; Application.targetFrameRate = 60; //gameStatus = true; MakeInstance(); savedCoins = false; _ingameUiManager = this.GetComponent<IngameUIManager>(); _scoreManager = this.gameObject.GetComponent<ScoreManager>(); _levelEnvironmentSpawner = GameObject.Find("LevelSpawner").GetComponent<LevelEnvironmentSpawner>(); if (LevelTypeController.instance != null) { gameType = LevelTypeController.instance.GetGameType(); } else // In the editor this runs if you are not playing from the menu scene { gameType = "Level0"; //gameType = "Level0"; Endless } if (LevelTypeController.instance.GetLastGameSlider() == false) { StartCoroutine(FadeInMusic()); } }
private void Awake() { environmentSpawnerScript = this.gameObject.GetComponent<LevelEnvironmentSpawner>(); slideSpawnScript = this.gameObject.GetComponent<SlideSpawner>(); levelSegSelect = this.gameObject.GetComponent<LevelSegmentSelection>(); tutorialScript = this.gameObject.GetComponent<Tutorial>(); //LoadTextAssets for ObjectSegments LoadTextAssets(); MakeInstance(); }
void Awake() { scoreManagerScript = this.gameObject.GetComponent<ScoreManager>(); _levelEnvironmentSpawner = GameObject.Find("LevelSpawner").GetComponent<LevelEnvironmentSpawner>(); _audioOnOffButton.onClick.AddListener( ChangeAudioSettings ); InitializeUIElements(); if (LevelTypeController.instance.GetLastGameSlider() == false) { _startScreen.SetActive(true); } else { StartGameCountDown(); } //_canvasTransform = GameObject.Find("Canvas").transform; }