/// <summary> /// Raises the <see cref="E:Ping" /> event. /// </summary> /// <param name="args">The <see cref="GamePingEventArgs"/> instance containing the event data.</param> private void OnPing(GamePingEventArgs args) { if (!args.Source.IsMe && ShouldRun() && (args.Source is Obj_AI_Hero)) { var pingType = args.PingType; var srcHero = args.Source as Obj_AI_Hero; if (pingType == PingCategory.Normal) { var textObject = new Render.Text( srcHero.ChampionName, new Vector2( Drawing.WorldToScreen(args.Position.To3D()).X, Drawing.WorldToScreen(args.Position.To3D()).Y + 15), 17, SharpDX.Color.White) { PositionUpdate = () => new Vector2( Drawing.WorldToScreen(args.Position.To3D()).X, Drawing.WorldToScreen(args.Position.To3D()).Y + 30), Centered = true }; textObject.Add(0); LeagueSharp.Common.Utility.DelayAction.Add(1000, () => { textObject.Remove(); }); } } }