private void Awake() { GameManager.Initialize(); GameText.DeactivateEvent(); GameText.SetInGameTextNowEvent(textAsset); playerController = GameObject.FindGameObjectWithTag("Player").GetComponent <Player_Starship_Controller>(); playerCamera = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <Player_Camera_Controller>(); PlayerStarshipTr = playerController.transform; }
private void Awake() { GameManager.Initialize(); SceneController.LoadAdditiveScene(sceneLocationName); GameText.DeactivateEvent(); GameText.SetInGameTextNowEvent(textAsset); playerCamera = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <Player_Camera_Controller>(); playerController = GameObject.FindGameObjectWithTag("Player").GetComponent <Player_Starship_Controller>(); playerController.GetComponent <Health>().OnDeath += RestartGame; }
private void Awake() { GameManager.Initialize(); SceneController.LoadAdditiveScene(sceneLocationName); GameText.DeactivateEvent(); GameText.SetInGameTextNowEvent(textAsset); playerController = GameObject.FindGameObjectWithTag("Player").GetComponent <Player_Starship_Controller>(); playerCamera = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <Player_Camera_Controller>(); playerStarship = playerController.GetComponent <Starship>(); playerController.GetComponent <Health>().OnDeath += OnPlayerDeath; systemStarships = GetComponent <System_Starships>(); PlayerStarshipTr = playerController.transform; EndTrigger.OnPlayerStarshipEnter += PlayerStarshipEnterEndTrigger; }
private void Awake() { GameManager.Initialize(); player_Camera_Controller = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <Player_Camera_Controller>(); player_Starship_Controller = GameObject.FindGameObjectWithTag("Player").GetComponentInParent <Player_Starship_Controller>(); playerStarship = player_Starship_Controller.GetComponent <Starship>(); player_Starship_Controller.GetComponent <Health>().OnDeath += Restart; GameText.DeactivateEvent(); GameText.SetInGameTextNowEvent(textAsset); GameAudio.StartAudioEvent(audioClip, 0.7f, true); if (StaticSettings.isRestart) { isRestart = true; StaticSettings.isRestart = false; } EndTrigger.OnPlayerStarshipEnter += OnPlayerStarshipEnterEndTrigger; }
private void Awake() { GameManager.Initialize(); SceneController.LoadAdditiveScene(sceneLocation); GameText.DeactivateEvent(); GameText.SetInGameTextNowEvent(textAsset); systemStarships = GetComponent <System_Starships>(); playerController = GameObject.FindGameObjectWithTag("Player").GetComponent <Player_Starship_Controller>(); playerCamera = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <Player_Camera_Controller>(); playerStarship = playerController.GetComponent <Starship>(); playerController.GetComponent <Health>().OnDeath += OnPlayerDeath; systemStarships.StarshipsTeams.Add(new System_Starships.StarshipsTeam(playerStarship.GetComponent <Starship>())); systemStarships.StarshipsTeams.Add(new System_Starships.StarshipsTeam()); playerCamera.SetPositionWithOffset(playerController.transform.position); screenDark.SetDark(false); playerController.SetLockControl(true); }
private void CloseGameMenu() { GameText.DeactivateEvent(); }