Exemplo n.º 1
0
    void Die(Hero attackingHero)
    {
        if (!this.IsAlive())
        {
            return;
        }

        AudioSourceExt.StopClipOnObject(this.MaxSizeSound);
        Destroy(this.MaxSizeSound);

        SoundFX.Instance.OnHeroDies(this);
        this.RespawnTimeLeft        = this.RespawnTimeCalculated;
        this.RespawnTimeCalculated += this.RespawnTimeIncreasePerDeath;
        this.NumDeaths++;

        this.SetGrowStage(0);
        this.StopChannelGrow();
        this.Stomping = false;

        this.TimeAtMaxSize = 0;
        this.RemoveMaxSizeVisual();
    }
Exemplo n.º 2
0
 void StopVictorySound()
 {
     AudioSourceExt.StopClipOnObject(this.GameWonSound);
     Destroy(this.GameWonSound);
 }
Exemplo n.º 3
0
 public GameObject OnHeroStompLandStun(Hero hero)
 {
     return(AudioSourceExt.PlayRandomClipAtPoint(this.StompLandStun, hero.xyz()));
 }
Exemplo n.º 4
0
 void StopHeroAboutToWinSound()
 {
     SoundFX.Instance.StartMusic();
     AudioSourceExt.StopClipOnObject(this.HeroAboutToWinSound);
     Destroy(this.HeroAboutToWinSound);
 }
Exemplo n.º 5
0
 public GameObject OnHeroDies(Hero hero)
 {
     return(AudioSourceExt.PlayRandomClipAtPoint(this.HeroDies, hero.xyz()));
 }
Exemplo n.º 6
0
 public GameObject OnHeroRespawn(Hero hero)
 {
     return(AudioSourceExt.PlayRandomClipAtPoint(this.Respawn, hero.xyz()));
 }
Exemplo n.º 7
0
 public GameObject OnHeroGrowComplete(Hero hero)
 {
     return(AudioSourceExt.PlayRandomClipAtPoint(this.GrowComplete, hero.xyz()));
 }
Exemplo n.º 8
0
 public GameObject OnHeroDoubleJumped(Hero hero)
 {
     return(AudioSourceExt.PlayRandomClipAtPoint(this.DoubleJump, hero.xyz()));
 }
Exemplo n.º 9
0
 public GameObject OnHeroReachedMaxSize(Hero hero)
 {
     return(AudioSourceExt.PlayRandomClipAtPoint(this.HeroReachedMaxSize, hero.xyz()));
 }
Exemplo n.º 10
0
 public GameObject OnMatchWon(Hero hero)
 {
     return(AudioSourceExt.PlayRandomClipAtPoint(this.MatchWon, hero.xyz()));
 }
Exemplo n.º 11
0
 public void Stop()
 {
     AudioSourceExt.StopClipOnObject(this.soundObject);
     Destroy(this.soundObject);
     Destroy(this.gameObject);
 }