Exemplo n.º 1
0
    public void OnGameEvent(GameOverGameEvent gameOverEvent)
    {
        m_IsDying = true;
        OnGameOver(true);
        // Remove collision to avoid hurting player or being hurt
        GetComponent <BoxCollider2D>().enabled = false;
        Rigidbody2D body = GetComponent <Rigidbody2D>();

        if (body != null)
        {
            // Avoid enemy falling through floor
            body.gravityScale = 0f;
        }
        // Let some time for the dying animation to be played
        Destroy(gameObject, 1);
    }
Exemplo n.º 2
0
 public void OnGameEvent(GameOverGameEvent gameOver)
 {
     ChangeNextTransition(HSMTransition.EType.Clear, typeof(GameFlowGameOverState));
 }
 public void OnGameEvent(GameOverGameEvent gameOverGameEvent)
 {
     // Stop the slow motion to not interfere with the gameover state, who will set timescale to 0
     StopAllCoroutines();
 }
Exemplo n.º 4
0
 public void OnGameEvent(GameOverGameEvent gameOverGameEvent)
 {
     StopAllCoroutines();
     m_AudioLowPassFilter.cutoffFrequency = 22000;
 }
Exemplo n.º 5
0
 public void OnGameEvent(GameOverGameEvent gameOver)
 {
     gameObject.SetActive(true);
     SoundManagerProxy.Get().PlayMusic(m_GameOverMusic);
 }
Exemplo n.º 6
0
 public void OnGameEvent(GameOverGameEvent gameOverEvent)
 {
     ClearFireCommands();
     this.UnregisterToUpdate(EUpdatePass.AI);
     m_IsRegistered = false;
 }
Exemplo n.º 7
0
 public void OneGameEvent(GameOverGameEvent gameOverEvent)
 {
     ChangeNextTransition(HSMTransition.EType.Clear, typeof(PlayerGameOverState));
 }
Exemplo n.º 8
0
 public void OnGameEvent(GameOverGameEvent uiEvent)
 {
     gameObject.SetActive(false);
 }
Exemplo n.º 9
0
 public void OnGameEvent(GameOverGameEvent gameOverEvent)
 {
     m_IsDying = true;
     OnGameOver();
 }
Exemplo n.º 10
0
 public void OnGameEvent(GameOverGameEvent gameOverGameEvent)
 {
     StopAllCoroutines();
 }
Exemplo n.º 11
0
 public void OnGameEvent(GameOverGameEvent gameOver)
 {
     gameObject.SetActive(true);
 }