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(); }
void StopVictorySound() { AudioSourceExt.StopClipOnObject(this.GameWonSound); Destroy(this.GameWonSound); }
public GameObject OnHeroStompLandStun(Hero hero) { return(AudioSourceExt.PlayRandomClipAtPoint(this.StompLandStun, hero.xyz())); }
void StopHeroAboutToWinSound() { SoundFX.Instance.StartMusic(); AudioSourceExt.StopClipOnObject(this.HeroAboutToWinSound); Destroy(this.HeroAboutToWinSound); }
public GameObject OnHeroDies(Hero hero) { return(AudioSourceExt.PlayRandomClipAtPoint(this.HeroDies, hero.xyz())); }
public GameObject OnHeroRespawn(Hero hero) { return(AudioSourceExt.PlayRandomClipAtPoint(this.Respawn, hero.xyz())); }
public GameObject OnHeroGrowComplete(Hero hero) { return(AudioSourceExt.PlayRandomClipAtPoint(this.GrowComplete, hero.xyz())); }
public GameObject OnHeroDoubleJumped(Hero hero) { return(AudioSourceExt.PlayRandomClipAtPoint(this.DoubleJump, hero.xyz())); }
public GameObject OnHeroReachedMaxSize(Hero hero) { return(AudioSourceExt.PlayRandomClipAtPoint(this.HeroReachedMaxSize, hero.xyz())); }
public GameObject OnMatchWon(Hero hero) { return(AudioSourceExt.PlayRandomClipAtPoint(this.MatchWon, hero.xyz())); }
public void Stop() { AudioSourceExt.StopClipOnObject(this.soundObject); Destroy(this.soundObject); Destroy(this.gameObject); }