Maybe I'm not looking in the right places, but I cannot find a way to enable/disable orx objects. By enable/disable I mean that I don't want graphics shown, events received, clocks updated, without destroying the object.
Ah nope, it's not there but I can add it.
Generally I tend to add events to notify when something is done by orx itself and there's no code path that would lead to orx enable/disable an object on its own, those have to be triggered by the user.
Oh, like I have 10 enemy on screen, when player kills them, they could simple disable themselves and could done some necessary cleaning stuffs, when they are enabled they could set some variables at random like their life,anger,speed etc.
Or I can create my enemies first, and put them to sleep, then at random interval I would enable them. They would do then necessary stuffs on themselves.
But this could also be done using other techniques, an enemy manager could do this sort of stuffs though, as their is event for object create and delete, enable/disable can also be an event.
Well in the case of creation and deletion, those can be done by orx without any direct user action (spawners, lifetime, ...), which is not the case of enabling/disabling.
That being said I don't have any problem with adding those events.
Comments
Generally I tend to add events to notify when something is done by orx itself and there's no code path that would lead to orx enable/disable an object on its own, those have to be triggered by the user.
For which scenario would you need it?
Or I can create my enemies first, and put them to sleep, then at random interval I would enable them. They would do then necessary stuffs on themselves.
But this could also be done using other techniques, an enemy manager could do this sort of stuffs though, as their is event for object create and delete, enable/disable can also be an event.
That being said I don't have any problem with adding those events.