Пример #1
0
        public override void Initialize()
        {
            if (!Value.Use("tracker.enable"))
            {
                Logger.Warn("Tracker Disabled!");
                return;
            }
            HeroSpellAvaliblitys = new Dictionary <AIHeroClient, SpellAvaliblity>(EntityManager.Heroes.AllHeroes.Count);
            HeroSpellSprites     = new Dictionary <AIHeroClient, SpellSprites>();
            TrackerHud           = new Sprite(TextureLoader.BitmapToTexture(Resources.SpellLayout));
            using (new TimeMeasure("Tracker Sprite Generation"))
            {
                foreach (var hero in EntityManager.Heroes.AllHeroes)
                {
                    var spellAvaliblity = new SpellAvaliblity(hero);
                    HeroSpellAvaliblitys[hero] = spellAvaliblity;
                    //var spellSprites = new SpellSprites();
                    //foreach (SpellSlot slot in SpellAvaliblity.TrackedSpellSlots)
                    //{
                    //    var spell = spellAvaliblity.GetSpell(slot);
                    //    spellSprites.AddSpell(slot,
                    //        IconManager.GetSpellSprite(spell, IconGenerator.IconType.Square, Value.Get("tracker.visual.size"), Color.Red, Value.Get("tracker.visual.border.width")),
                    //        IconManager.GetSpellSprite(spell, IconGenerator.IconType.Square, Value.Get("tracker.visual.size"), Color.Green, Value.Get("tracker.visual.border.width")));

                    //}
                    //HeroSpellSprites[hero] = spellSprites;
                }
            }
        }
Пример #2
0
        public override void Initialize()
        {
            if (!Value.Use("tracker.enable"))
            {
                Logger.Warn("Tracker Disabled!");
                return;
            }
            HeroSpellAvaliblitys = new Dictionary<AIHeroClient, SpellAvaliblity>(EntityManager.Heroes.AllHeroes.Count);
            HeroSpellSprites = new Dictionary<AIHeroClient, SpellSprites>();
            TrackerHud = new Sprite(TextureLoader.BitmapToTexture(Resources.SpellLayout));
            using (new TimeMeasure("Tracker Sprite Generation"))
            {
                foreach (var hero in EntityManager.Heroes.AllHeroes)
                {
                    var spellAvaliblity = new SpellAvaliblity(hero);
                    HeroSpellAvaliblitys[hero] = spellAvaliblity;
                    //var spellSprites = new SpellSprites();
                    //foreach (SpellSlot slot in SpellAvaliblity.TrackedSpellSlots)
                    //{
                    //    var spell = spellAvaliblity.GetSpell(slot);
                    //    spellSprites.AddSpell(slot,
                    //        IconManager.GetSpellSprite(spell, IconGenerator.IconType.Square, Value.Get("tracker.visual.size"), Color.Red, Value.Get("tracker.visual.border.width")),
                    //        IconManager.GetSpellSprite(spell, IconGenerator.IconType.Square, Value.Get("tracker.visual.size"), Color.Green, Value.Get("tracker.visual.border.width")));

                    //}
                    //HeroSpellSprites[hero] = spellSprites;
                }
            }
        }
Пример #3
0
 public override void Initialize()
 {
     if (!Value.Use("tracker.enable"))
     {
         Logger.Warn("Tracker Disabled!");
         return;
     }
     HeroSpellAvaliblitys = new Dictionary <AIHeroClient, SpellAvaliblity>(EntityManager.Heroes.AllHeroes.Count);
     HeroSpellSprites     = new Dictionary <AIHeroClient, Dictionary <SpellSlot, Sprite> >();
     TrackerHud           = new Sprite(TextureLoader.BitmapToTexture(Resources.SpellLayout2));
     IconManager.IconGenerator.Padding = 0;
     using (new TimeMeasure("Tracker Sprite Generation"))
     {
         foreach (var hero in EntityManager.Heroes.AllHeroes)
         {
             var spellAvaliblity = new SpellAvaliblity(hero);
             HeroSpellAvaliblitys[hero] = spellAvaliblity;
             var spriteDictonary = new Dictionary <SpellSlot, Sprite>();
             foreach (SpellSlot slot in SpellAvaliblity.TrackedSpellSlots)
             {
                 if (slot != SpellSlot.Summoner1 && slot != SpellSlot.Summoner2)
                 {
                     continue;
                 }
                 var spell = spellAvaliblity.GetSpell(slot);
                 spriteDictonary[slot] = IconManager.GetSpellSprite(spell, IconGenerator.IconType.Square, 8, Color.Empty, 1);
             }
             HeroSpellSprites[hero] = spriteDictonary;
         }
     }
 }
Пример #4
0
        public override void Initialize()
        {
            if (!Value.Use("tracker.enable"))
            {
                Logger.Warn("Tracker Disabled!");
                return;
            }
            HeroSpellAvaliblitys = new Dictionary<AIHeroClient, SpellAvaliblity>(EntityManager.Heroes.AllHeroes.Count);
            HeroSpellSprites = new Dictionary<AIHeroClient, Dictionary<SpellSlot, Sprite>>();
            TrackerHud = new Sprite(TextureLoader.BitmapToTexture(Resources.SpellLayout2));
            IconManager.IconGenerator.Padding = 0;
            using (new TimeMeasure("Tracker Sprite Generation"))
            {
                foreach (var hero in EntityManager.Heroes.AllHeroes)
                {
                    var spellAvaliblity = new SpellAvaliblity(hero);
                    HeroSpellAvaliblitys[hero] = spellAvaliblity;
                    var spriteDictonary = new Dictionary<SpellSlot, Sprite>();
                    foreach (SpellSlot slot in SpellAvaliblity.TrackedSpellSlots)
                    {

                        if (slot != SpellSlot.Summoner1 && slot != SpellSlot.Summoner2) continue;
                        var spell = spellAvaliblity.GetSpell(slot);
                        spriteDictonary[slot] = IconManager.GetSpellSprite(spell, IconGenerator.IconType.Square, 8, Color.Empty, 1);
                    }
                    HeroSpellSprites[hero] = spriteDictonary;
                }
            }
        }