public override void OnActivate() { Debug.Log("Waking Up Game Over State"); gog = FindObjectOfType(typeof(GameOverGUI)) as GameOverGUI; Debug.Log("Found GOG: " + gog.name); gog.showing = true; Managers.Mission.isRunning = false; }
void Awake() { lifeTracker = GameObject.FindGameObjectWithTag(Tags.guiController).GetComponent <LifeTracker>(); respawnPosition = GameObject.FindGameObjectWithTag(Tags.player).transform.position; respawnRotation = GameObject.FindGameObjectWithTag(Tags.player).transform.rotation; hash = GameObject.FindGameObjectWithTag(Tags.dataController).GetComponent <HashIDs>(); gameOver = GameObject.FindGameObjectWithTag(Tags.guiController).GetComponent <GameOverGUI>(); spawner = GameObject.FindGameObjectWithTag(Tags.dataController).GetComponent <AsteroidSpawner>(); }
private void Awake() { if (instance == null) { instance = this; } else { Destroy(this); } gameOverPanel.SetActive(false); }
public override void OnActivate() { Debug.Log("Waking Up Game Over State"); gog = FindObjectOfType(typeof(GameOverGUI)) as GameOverGUI; Debug.Log("Found GOG: " + gog.name); gog.showing = true; Debug.Log("About to disable " + Managers.Mission.players.Count + " players"); foreach(Player p in Managers.Mission.players){ if(p.currentShip){ p.currentShip.rigidbody.angularVelocity = Vector3.zero; p.currentShip.rigidbody.velocity = Vector3.zero; } p.disabled = true; } }
/* * @brief ゲームオーバー開始 */ void OnStartGameOver() { // ポーズ実行 Hashtable data = new Hashtable(); data.Add("flg", true); NotificationCenter.DefaultCenter.PostNotification(this, "OnPuase", data); // 死亡したのでゲームオーバー画面を出す GameOverGUI gui = GetComponent <GameOverGUI>() as GameOverGUI; if (gui) { gui.enabled = true; } }
IEnumerator _gameOverTitleAnimation() { MusicManager.Play(UISound); GameOverGUI.transform.Translate(Vector2.right * Camera.localPosition.x); GameOverGUI.transform.Translate(Vector2.left * 3f); gameOverTitle.Translate(Vector2.right * 3f); GameOverGUI.SetActive(true); while (gameOverTitle.localPosition.y > -639.2f) { gameOverTitle.Translate(Vector2.down * 0.1f); yield return(null); } yield return(new WaitForSeconds(0.35f)); gameOverTitle.SetParent(null); muteButton.interactable = true; StartCoroutine("_gameOverPanel"); }
// Use this for initialization void Start() { instance = this; }
// Use this for initialization void Start () { this.gui = new GameOverGUI (); this.gui.setAudioClick (this.audio); this.gui.initResources (); }