Пример #1
0
        public HeroTracker(Obj_AI_Hero hero, Bitmap bmp)
        {
            Hero = hero;

            RecallStatus = Packet.S2C.Teleport.Status.Unknown;
            Hero = hero;
            var image = new Render.Sprite(bmp, new Vector2(0, 0));
            image.GrayScale();
            image.Scale = new Vector2(MinimapHack.Instance().Menu.IconScale, MinimapHack.Instance().Menu.IconScale);
            image.VisibleCondition = sender => !hero.IsVisible && !hero.IsDead;
            image.PositionUpdate = delegate
            {
                Vector2 v2 = Drawing.WorldToMinimap(LastLocation);
                v2.X -= image.Width / 2f;
                v2.Y -= image.Height / 2f;
                return v2;
            };
            image.Add(0);
            LastSeen = 0;
            LastLocation = hero.ServerPosition;
            PredictedLocation = hero.ServerPosition;
            BeforeRecallLocation = hero.ServerPosition;

            Text = new Render.Text(0, 0, "", MinimapHack.Instance().Menu.SSTimerSize, Color.White)
            {
                VisibleCondition =
                    sender =>
                        !hero.IsVisible && !Hero.IsDead && MinimapHack.Instance().Menu.SSTimer && LastSeen > 20f &&
                        MinimapHack.Instance().Menu.SSTimerStart <= Game.ClockTime - LastSeen,
                PositionUpdate = delegate
                {
                    Vector2 v2 = Drawing.WorldToMinimap(LastLocation);
                    v2.Y += MinimapHack.Instance().Menu.SSTimerOffset;
                    return v2;
                },
                TextUpdate = () => Program.Format(Game.ClockTime - LastSeen),
                OutLined = true,
                Centered = true
            };
            Text.Add(0);

            Obj_AI_Base.OnTeleport += Obj_AI_Base_OnTeleport;
            Game.OnGameUpdate += Game_OnGameUpdate;
            Drawing.OnEndScene += Drawing_OnEndScene;
        }
Пример #2
0
 public ChampionTracker(Obj_AI_Hero champion)
 {
     Champion = champion;
     LastPotion = champion.ServerPosition;
     StartInvisibleTime = Game.ClockTime;
     var sprite =
         new Render.Sprite(
             Helper.ChangeOpacity(
                     ResourceImages.GetChampionSquare(champion.SkinName) ??
                     ResourceImages.GetChampionSquare("Aatrox"), Opacity),new Vector2(0,0));
     sprite.GrayScale();
     sprite.Scale = new Vector2(Scale, Scale);
     sprite.VisibleCondition = sender => TrackerCondition;
     sprite.PositionUpdate =
         () => Drawing.WorldToMinimap(LastPotion) + new Vector2(-(sprite.Width / 2), -(sprite.Height / 2));
     sprite.Add(0);
     Text = new Render.Text(0, 0, "", Menu.Item("TextSize").GetValue<Slider>().Value, Color.White)
     {
         VisibleCondition = sender => TrackerCondition,
         PositionUpdate = () => Drawing.WorldToMinimap(LastPotion),
         TextUpdate = () => Helper.FormatTime(Game.ClockTime - StartInvisibleTime),
         OutLined = true,
         Centered = true
     };
     Text.Add(0);
     AppDomain.CurrentDomain.DomainUnload += CurrentDomainOnDomainUnload;
     AppDomain.CurrentDomain.ProcessExit += CurrentDomainOnDomainUnload;
 }