Please note that this may be a bit of a noobish question, as I’ve wanted to get into Paradox for a while, and have been daunted by the lack of documentation or tutorials.
I’m looking to use the code given in this answer to render primitives showing where the colliders for the jumpy jet are in the jumpy jet demo, but I can’t seem to find any kind of rendering function or code anywhere to call this:
// Renders a rectangle via spritebatch over all the colliders
foreach (RectangleF coll in colliders) // colliders is in CharacterScript
{
SBDraw.RectangleAA(coll, Color.Lime, SBDraw.LineStyles.Solid);
}
I come from an XNA/Monogame background, so all the rendering code was done in a function call from the main Game
class. I can’t find any Render
method to override in any of the scripts, and putting it right before or after the await Script.NextFrame();
line in the Execute()
loop of CharacterScript
didn’t have any effect, so I’m pretty sure that’s the wrong place. Where do I put the draw code?
Also, the code from the answer linked above requires me to set the class’ SpriteBatch
property, but I could find no variable or property of that type in the Character or Game Script, or any of its properties. Instead, I set it to a new SpriteBatch
object with a reference to a GraphicsDevice
property I found, which I’m quite certain is not the right way to do this, and is likely contributing the problem.
Basically, where is the rendering code in this demo game, and where should my own pixel rendering code go?
EDIT: I’m using Paradox 1.2, if that helps.