Inheritance: MonoBehaviour
Example #1
0
 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;
 }
Example #2
0
 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);
 }
Example #4
0
 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;
     }
 }
Example #5
0
    /*
     *  @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;
        }
    }
Example #6
0
    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");
    }
Example #7
0
 // Use this for initialization
 void Start()
 {
     instance = this;
 }
Example #8
0
	// Use this for initialization
	void Start () {
		this.gui = new GameOverGUI ();
		this.gui.setAudioClick (this.audio);
		this.gui.initResources ();
	}