Not the experimental kind, the stabby kind. Though there will surely be experimentation involved. Arcade has an event in the event loop, on_update(delta_time) that is called in the same thread as on_draw. It appears to be the official OK way to update things needing updating. We’d prefer not to send on_update to every content item, not least because we’d have to implement the update method in all the classes, or inherit it somehow. So I’m thinking, why not let the items use PubSub to subscribe to the update if they want it. Our spike textures just have two states, I think. Yes. 1=down, 2=up. So I envision making a Spikes content subclass, as we did with Button, perhaps giving it a more generic name, since we have a prototype now in the DungeonControl class. Then it’ll subscribe to some message, probably ‘on_update’, and we’ll send it along with publish in the real on_update. I guess one would start with an on_update in DungeonView, where the loop is. We already have some code there:…
No comments yet. Log in to reply on the Fediverse. Comments will appear here.