BlindPrediction.Program.Update C# (CSharp) Метод

Update() статический приватный Метод

static private Update ( EventArgs e ) : void
e System.EventArgs
Результат void
        static void Update(EventArgs e)
        {
            if (!Game.IsInGame) {
                if (HeroList.Any())
                    HeroList.Clear();
                return;
            }
            if (!Menu.Item("toggle").GetValue<bool>()) return;
            Hero MyHero = ObjectManager.LocalHero;

            // Save heroes to dictionary as they cannot be detected in fog (Format <Hero, Last Seen Time>)
            foreach (Hero v in ObjectManager.GetEntities<Hero>().Where(x => x.Team != MyHero.Team)) {
                if (!HeroList.ContainsKey(v)) {
                    HeroList.Add(v, 0);
                }
            }

            // Update last seen time of all visible heroes
            var ValuesToUpdate = new List<Hero>();

            foreach (var v in HeroList) {
                if (v.Key.IsVisible) {
                    ValuesToUpdate.Add(v.Key);
                }
            }

            foreach (var item in ValuesToUpdate) {
                HeroList[item] = Game.GameTime;
            }
        }