Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using Turbo.Plugins.Default;
- namespace Turbo.Plugins.glq
- {
- public class MonsterHauntedandLocustPlugin : BasePlugin, IInGameWorldPainter
- {
- public WorldDecoratorCollection LocustDecorator { get; set; }
- public WorldDecoratorCollection HauntedDecorator { get; set; }
- public bool ShowLocust { get; set; }
- public bool ShowHaunted { get; set; }
- public MonsterHauntedandLocustPlugin()
- {
- Enabled = true;
- ShowLocust = true;
- ShowHaunted = true;
- }
- public override void Load(IController hud)
- {
- base.Load(hud);
- var LocustGroundBrush = Hud.Render.CreateBrush(255, 0, 255, 128, 3, SharpDX.Direct2D1.DashStyle.Solid);
- LocustDecorator = new WorldDecoratorCollection(
- new GroundCircleDecorator(Hud)
- {
- Brush = LocustGroundBrush,
- Radius = 0.6f,
- }
- );
- var HauntedGroundBrush = Hud.Render.CreateBrush(255, 0, 128, 255, 0, SharpDX.Direct2D1.DashStyle.Solid);
- HauntedDecorator = new WorldDecoratorCollection(
- new GroundCircleDecorator(Hud)
- {
- Brush = HauntedGroundBrush,
- Radius = 0.5f,
- }
- );
- }
- public void PaintWorld(WorldLayer layer)
- {
- var monsters = Hud.Game.AliveMonsters;
- foreach (var monster in monsters)
- {
- if (monster.Locust && ShowLocust)
- {
- LocustDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
- }
- if (monster.Haunted && ShowHaunted)
- {
- HauntedDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement