psychopyro212

Untitled

Feb 16th, 2017
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.15 KB | None | 0 0
  1. namespace Turbo.Plugins.PsychosPlugins
  2. {
  3.     using Turbo.Plugins.Default;
  4.     public class CursorMarkerPlugin : BasePlugin
  5.     {
  6.         public WorldDecoratorCollection CursorDecorator { get; set; }
  7.         public IScreenCoordinate CursorLocation {get;set; }
  8.         public bool InTownToggle { get; set; }
  9.         public CursorMarkerPlugin()
  10.         {
  11.             Enabled = true;
  12.             InTownToggle = false;
  13.         }
  14.  
  15.         public override void Load(IController hud)
  16.         {
  17.             base.Load(hud);
  18.  
  19.             CursorDecorator = new WorldDecoratorCollection(
  20.                 new GroundCircleDecorator(Hud)
  21.                 {
  22.                     Brush = Hud.Render.CreateBrush(255, 255, 255, 255, 5),
  23.                     Radius = 2f
  24.                 }
  25.                 );
  26.         }
  27.  
  28.         public override void PaintWorld(WorldLayer layer)
  29.         {
  30.             if (Hud.Game.IsInTown && InTownToggle == true) return;
  31.             CursorLocation = Hud.Window.CreateScreenCoordinate(Hud.Window.CursorX,Hud.Window.CursorY);
  32.             CursorDecorator.Paint(layer,null,CursorLocation.ToWorldCoordinate(),string.Empty);
  33.         }
  34.     }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment