im very early into a game project and am basically just working on creating the various components as of now. something im trying to do is create a battle screen that is triggered when a player sprite collides with an enemy sprite. an issue that I am having is that I cant draw objects (like rects and lines) after using the addSprite method on my playerInstance. I can draw my battle UI before calling addSprite no problem. but after it won't draw. this issue persists even if I use remove() on the sprite instance and then try and call my draw function. im sure this is a lifecycle thing im not understanding but would really appreciate help on why this is. also, I am using nova on Mac for development.
here are the three functions im using to do this.
local function renderSprites()
playerInstance = Player(200,100)
enemyInstance = Enemy(160, 105)
local function deleteSprites()
local function drawWorld()
playdate.graphics.drawRect(0, 180, 100, 100)