Hey folks-
I'm working on making a Tetris game for the sake of practice with the engine. I've decided that the easiest way to do this would be to have a singular data-manager object, the Grid, which keeps tabs on where the blocks are, etc. Since I didn't want to have to handle a node for every single block on the board, I decided I would just allow the Grid to hold its own data and draw the board and the blocks as necessary.
I have the Grid's width and height exported as variables, and I'd like to be able to call update()
in the editor only when width
or height
get changed. Right now I have it redrawing on every _process
call, which works and probably isn't causing any meaningful performance issues, but I felt this was a good chance to ask if there's a way to only call CanvasItem.update()
when certain variable values get updated in the inspector, or failing that, when any exported variables get changed in the inspector.