Open austingray opened 5 years ago
Mentioned in #6
We need a way for objects to notify their layers that they have been updated and therefor need to be redrawn. The challenge here will be moving some draw logic to the Layer level. Currently layers are just explicitly referenced in the object's draw method.
Maybe layers have a subscription interface for adding objects to them, and when the layer is notified that it needs to be updated, it draws everything that is subscribed to it.
Layers shouldn't redraw when they don't need to. The logic to trigger a redraw should be moved to the Layer object.