Guest User

MonsterMarkPlugin

a guest
Apr 11th, 2017
655
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.29 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using Turbo.Plugins.Default;
  5.  
  6. namespace Turbo.Plugins.BM
  7. {
  8.  
  9.     public class MonsterMarkPlugin : BasePlugin, IInGameWorldPainter
  10.     {
  11.  
  12.         public WorldDecoratorCollection MonsterDecorator { get; set; }
  13.  
  14.  
  15.         public MonsterMarkPlugin()
  16.         {
  17.             Enabled = true;
  18.         }
  19.  
  20.         public override void Load(IController hud)
  21.         {
  22.             base.Load(hud);
  23.  
  24.             var shadowBrush = Hud.Render.CreateBrush(96, 0, 0, 0, 1);
  25.  
  26.             MonsterDecorator = new WorldDecoratorCollection(
  27.                 new GroundCircleDecorator(Hud)
  28.                 {
  29.                     Brush = Hud.Render.CreateBrush(255, 255, 255, 0, 2),
  30.                     Radius = 0.2f,
  31.                 },
  32.                 new GroundCircleDecorator(Hud)
  33.                 {
  34.                     Brush = Hud.Render.CreateBrush(255, 255, 0, 0, 1),
  35.                     Radius = 0.1f,
  36.                 }
  37.                 );
  38.         }
  39.  
  40.         public void PaintWorld(WorldLayer layer)
  41.         {
  42.             var monsters = Hud.Game.AliveMonsters;
  43.  
  44.             foreach (var monster in monsters)
  45.             {
  46.                              MonsterDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
  47.             }
  48.         }
  49.     }
  50. }
Advertisement
Add Comment
Please, Sign In to add comment