public static void SetGameOver(int _player)
    {
        IsGameOver = true;
        GUIMgr.GameOver(_player);

        m_manager.m_gameBackgroundMusic.Stop();
    }
Exemple #2
0
    // ======================================================================================
    public void TakeDamage()
    {
        if (GameMgr.IsPaused || SceneMgr.IsGameOver)
        {
            return;
        }

        m_nbLives--;
        GUIMgr.SetLives(m_nbLives);

        if (m_nbLives <= 0)
        {
            SceneMgr.SetGameOver(1);
            m_deathSFX.Play();
            m_animator.SetTrigger(m_onDeath);
        }
        else
        {
            m_damageSFX.Play();
        }
    }
 // ======================================================================================
 void Start()
 {
     Debug.Assert(m_manager == null, this.gameObject.name + " - GUIMgr : GUI Mgr must be unique!");
     m_manager = this;
 }
Exemple #4
0
	void OnApplicationQuit() {
		s_Instance = null;
	}