Example #1
0
        void OnChangeStats(StatsChangedEventData e)
        {
            if (Match.CurrentState.ContainsEntity(e.ChampID))
            {
                Champions.ForEach(c => {
                    if (c.ID == e.ChampID)
                    {
                        c.Health = e.Health;
                    }
                });

                if (OurChampion != null)
                {
                    if (DeathScreen.Visible && OurChampion.Champion.Alive)                       // we just spawned
                    {
                        PlayChampionReviveSound();
                    }
                    DeathScreen.Visible = !OurChampion.Champion.Alive;
                }
            }
        }