void Start() { starship = GameObject.FindGameObjectsWithTag("Starship")[0]; Debug.Log("Game Scene loaded"); startGameSnapshot.TransitionTo(1f); GameStateManager.BlockStarShipMovements(); GameStateManager.HideHUD(); if (!GameStateManager.isMidGame()) { GameStateManager.StartGame(); } if (GameStateManager.checkpoint != Vector3.zero) { starship.transform.position = GameStateManager.checkpoint; GameStateManager.AllowStarShipMovements(); GameStateManager.AllowStarShipHook(); GameStateManager.ShowPlanetNavigationSystem(); GameStateManager.ShowFuelNavigationSystem(); GameStateManager.ShowVestaNavigationSystem(); GameStateManager.ShowHUD(); gameStarted = true; Debug.Log("Checkpoint loaded"); // Vesta near starship if (GameStateManager.isMidGame()) { Vesta.transform.position = new Vector3(GameStateManager.checkpoint.x, GameStateManager.checkpoint.y + 40, 0); } } }
public void StartMidGame() { GameStateManager.AllowStarShipMovements(); GameStateManager.AllowStarShipHook(); GameStateManager.StartMidGame(); midGameObjects.SetActive(true); startGameObjects.SetActive(false); }
void Update() { if (GameStateManager.isStartGame()) { startGameObjects.SetActive(true); midGameObjects.SetActive(false); } if (GameStateManager.isMidGame()) { mainNavigationSystem.SetTarget(Mars); midGameObjects.SetActive(true); startGameObjects.SetActive(false); } if (GameStateManager.isInGame() && !GameStateManager.isTutorial()) { GameStateManager.AllowStarShipHook(); GameStateManager.ShowPlanetNavigationSystem(); GameStateManager.ShowFuelNavigationSystem(); GameStateManager.ShowVestaNavigationSystem(); if (!comunicationsWriter.HasAlreadyWritten() && !GameStateManager.isCheckpoint()) { comunicationsWriter.Write(sentence0_1); } // Liftoff if (!gameStarted && Input.GetAxis("Vertical") > 0) { gameStarted = true; GameStateManager.AllowStarShipMovements(); GameStateManager.ShowHUD(); if (!GameStateManager.isCheckpoint()) { comunicationsWriter.Write(sentence0_2); } } // end extreme danger message if (extremeDangerAudio.isPlaying && !EnemiesManager.isExtremeDanger()) { if (!extremeDangerEndWriter.HasAlreadyWritten()) { extremeDangerEndWriter.Write(sentence_extreme_danger_end); } } } }
public void Step3_ActivateHook() { GameStateManager.AllowStarShipHook(); GameStateManager.AllowStarShipMovements(); }