Jump to content

Recommended Posts

I want to draw cirlces and lines, I have this

public void Draw()
    {
        Radar3D.DrawLine(_nearestPoint, ObjectManager.Me.Position, Color.Red);

        _path.ForEach(i => Radar3D.DrawCircle(i, 2f, Color.Green));
        
        
    }

If I call it every 17ms from loop, there is nothing good in my Wow window, tell me how to use it correctly.

Link to comment
Share on other sites

I have dabbled a little bit with it, but I was not very successful myself. Maybe you need a draw event and then pulse the radar?

Radar3D.OnDrawEvent += () =>
{
	// draw
};
Radar3D.Pulse();

I believe you want the OnDrawEvent inside the Initialize() method.

Link to comment
Share on other sites

Helpplease with Radar3D.add_OnDrawEvent and Radar3D.remove_OnDrawEvent , because if i restart bot previous point will appear. I have problem with understendig those handlers and delegates:(

Link to comment
Share on other sites

Hello, you can subscribe your method to the event on initialize and unsubscribe on dispose:

    public void Initialize()
    {
        Radar3D.Pulse();
        Radar3D.OnDrawEvent += Radar3DOnDrawEvent;
    }
    
    public void Dispose()
    {
        Radar3D.OnDrawEvent -= Radar3DOnDrawEvent;
        Radar3D.Stop();
    }
    
    private static void Radar3DOnDrawEvent()
    {
        if (ObjectManager.Target.IsValid)
            Radar3D.DrawLine(ObjectManager.Me.Position, ObjectManager.Target.Position, Color.Chocolate);
        Radar3D.DrawCircle(ObjectManager.Me.Position, 5, Color.Chocolate);
    }

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...