void Awake() { if (Instance == null) { Instance = this; } }
private void Awake() { state = GameState.GamePlay; GameOverPanel.SetActive(false); PausePanel.SetActive(false); GamePlayPanel.SetActive(true); points = time = 0; InvokeRepeating("Time", 1f, 1f); }
public void GameOverSettings() { state = GameState.GameOver; GameOverPanel.SetActive(true); GamePlayPanel.SetActive(false); PausePanel.SetActive(false); CancelInvoke("Time"); finalTimeText.text = "" + time; MeteorsManager.Instance.CancelMeteorsInvoke(); if (time > PlayerPrefs.GetInt("RecordTime")) { SaveRecord(time); } recordText.text = "" + PlayerPrefs.GetInt("RecordTime"); }
public override void Init() { GuideManager.RegisterModule(this); _gamePlayPanel = new GamePlayPanel(); _gamePlayPanel.SetComplexPanel(); switch (showTargetPanel) { case 0: _gamePlayPanel.Init(this); _gamePlayPanel.Show(0.6f); _gamePlayPanel.IsShowArrow(_isShow); break; case 1: _gamePlayPanel.TargetPanel = 1; _gamePlayPanel.Init(this); _gamePlayPanel.Show(0.6f); _gamePlayPanel.IsShowArrow(_isShow); break; } }