I can successfully assign an image table to a sprite when the game starts but I am having trouble understanding how to update an image table. For example, suppose a sprite has plain clothes and picks up a suit of armor from somewhere. I now want that sprite to reference the image table for "sprite in armor" instead of "sprite in plain clothes" when it walks. Suppose I have an armor checkbox in my Playdate system menu and I want the user to be able to check the box on and off and when they do the sprite will jump back-and-forth between wearing plain clothes and wearing armor. How would I go about doing this? Here is how I assigned the initial image table:
playerImage = gfx.imagetable.new("Images/Square/player")
local playerInstance = Player(200, 130, playerImage)
Any tips would be appreciated. My other menu items work fine (background, etc.) but I can't figure out how to switch to a different image table for a player that is already active and in the world. I see a setImage in the SDK documentation but I am not sure if that is the correct path forward.