/// <summary> /// Starts the game running. /// </summary> public void StartGame() { m_startOverlay.SetActive(false); _active = true; _lastPillarSpawnTime = 0; PillarController.Reset(); }
private void OnEnable() { if (instance == null) { instance = this; } }
/// <summary> /// Ends the game. /// </summary> /// <param name="won">Whether the player won.</param> void EndGame(bool won) { if (won) { _rigidbody.useGravity = false; _rigidbody.velocity = Vector3.zero; } PillarController.Stop(); _done = true; MinigameManager.Instance.EndGame(won, _score); }