FlxMouseEventManager alive vs active
-
I found this curious line in FlxMouseEventManager:
if (!reg.object.alive || !reg.object.exists || !reg.object.visible || !reg.mouseEnabled)
...which prompted me to search the rest of the flixel codebase for how
alive
is actually used, since I've never used it so far. It seems it's just there for convenience for game universes wherein things have health, take damage, die, etc., and isn't more basic than that. There are special helper functions here and there to leverage its use, but FlxMouseEventManager seems to be out of place here in using it.I'm going to take a wild guess that
.active
was intended here, which to me makes way more sense. The side effect of the current implementation is that currently my.active = false
objects, stuck behind a substate, are still functional with regards to mouseovers and mouse clicks, even withpersistentUpdate = false
on the parent. I was thinking to myself, what more do I need to do to make these things inactive while the substate is open? Well...I guess I have tokill()
them too, the way it currently is...thenrevive()
them when the substate closes.Am I off base here? Does anyone rely on FlxMouseEventManager using
alive
instead ofactive
? If so, how come?