Hello,
I have the following code in my PluginEnablerOrDisablerPlugin.cs file
PHP Code:
// ground circle for rift and gr progression globes
Hud.RunOnPlugin<GlobePlugin>(plugin =>
{
plugin.RiftOrbDecorator.Add(new GroundCircleDecorator(Hud)
{
Brush = Hud.Render.CreateBrush(255, 0, 0, 0, 3),
Radius = 1.5f
});
});
So the code places a small black circle around rift orbs and greater rift orbs.
My question is: Is it possible to put some kind of if statement to change the color of the circle depending if I am in a regular rift or a greater rift?
I tried putting this but it gives me exceptions:
PHP Code:
// ground circle for rift and gr progression globes
Hud.RunOnPlugin<GlobePlugin>(plugin =>
{
plugin.RiftOrbDecorator.Add(new GroundCircleDecorator(Hud)
{
if (Hud.Game.Me.InGreaterRift)
{
Brush = Hud.Render.CreateBrush(255, 122, 35, 174, 3),
Radius = 1.5f
}
else
{
Brush = Hud.Render.CreateBrush(255, 255, 122, 0, 3),
Radius = 1.5f
}
});
});
So, would I have to create an actual plugin in order to run the if statement?
Thanks.