public PlayerStats()
        {
            if (!TryGetPlayerData())
            {
                Logger.Log("Could not retrive the PlayerStats, aborting.", ConsoleColor.Red);
                return;
            }
            start_tick = Game.GameTimeTickCount;

            background_texture  = Drawing.BitmapToTexture(new Bitmap(sprites.stats_bg_50));
            Drawing.OnDraw     += OnDraw;
            Drawing.OnEndScene += OnEndScene;
            Drawing.OnPreReset += OnPreReset;
        }
 private void InitVision()
 {
     foreach (var enemy in ObjectManager.Heroes.Enemies)
     {
         Console.WriteLine(enemy.ChampionName);
         last_seen.Add(enemy.NetworkId, enemy.IsVisible ? Game.GameTimeTickCount : 0);
         Bitmap bmp;
         try
         {
             bmp = (Bitmap)ChampIcons.ResourceManager.GetObject(enemy.ChampionName);
         }
         catch (Exception e)
         {
             Console.WriteLine(e.Message);
             bmp = new Bitmap(0, 0);
         }
         var tex = Drawing.BitmapToTexture(bmp);
         symbols.Add(enemy.NetworkId, tex);
     }
 }
Example #3
0
        public Build()
        {
            if (!TryGetItemList())
            {
                Logger.Log("Could not retrive the LoLItemList, aborting.", ConsoleColor.Red);
                return;
            }
            if (!TryGetPlayerBuild())
            {
                Logger.Log("Could not retrive the best Build for " + Player.ChampionName + ", aborting.",
                           ConsoleColor.Red);
                return;
            }


            background_texture = Drawing.BitmapToTexture(new Bitmap(sprites.stats_bg_60));

            Drawing.OnDraw     += OnDraw;
            Drawing.OnEndScene += OnEndScene;
            Drawing.OnPreReset += OnPreReset;
        }