Open Rudyrue opened 7 months ago
i also realized that this sorta applies to exists
too
you could just apply it to the tryUpdate call instead of affecting everything else
this IMO is expected behavior, setting any flixel things's active
or exists
to false
prevents update calls to it, setting visible
to false prevents draw() calls, why should this behave differently?
what else were you trying to do by setting it to false?
setting any flixel things's active or exists to false prevents update calls to it
yes but this also prevents anything else that's unrelated to the state to not update, that's why i was confused on why it did that
what else were you trying to do by setting it to false?
trying to prevent the main game loop from updating at runtime with my own loop with openfl's Event.ENTER_FRAME
i would probably have to use it anyways but it's still a bit weird that a state not updating prevents everything else that's not connected to the state to just not update
i was going to make a pr for this but on second thought there might've been something that required that like state switching which i guess you could just make a variable for state switching but eh
trying to prevent the main game loop from updating at runtime with my own loop with openfl's
Event.ENTER_FRAME
i would probably have to use it anyways but it's still a bit weird that a state not updating prevents everything else that's not connected to the state to just not update
can you be specific about what things are "not connected to the state"?
can you be specific about what things are "not connected to the state"?
plugins, sounds, cameras, elapsed, inputs etc they update seperately from the state's tryUpdate so im just wondering why the state not being active kills those
i guess inputs make sense though cause you don't use inputs outside of states
maybe cameras too
I feel like you're going a weird way about solving a problem, maybe take a step back and say what you're trying to do in the first place and why you (potentially) wanna reinvent the wheel here
I feel like you're going a weird way about solving an problem, maybe take a step back and say what you're trying to do in the first place and why you (potentially) wanna reinvent the wheel here
im not trying to reinvent the wheel, i was wondering why flixel prevents other objects from updating if a state stops updating because flxgroups don't stop another flxgroup from updating if that one group isn't updating
right but if a flxgroup is a member of another flxgroup that has active = false, then its expected that both groups will not update, and the state is the top of the chain in flixel
right but if a flxgroup is a member of another flxgroup that has active = false, then its expected that both groups will not update, and the state is the top of the chain in flixel
ohh ok that makes more sense
you could always just override your state's update func and not call super or something, but I really recommnd just saying what you're trying to do in the long run
if there's no state there's no reason to update other stuff separately
cameras don't update if the state isn't there because where will you use cameras? same for plugins, sounds, signals 100% of the time you are in a state so there's no real reason for stuff to update if the state isn't really there to begin with
you could always just override your state's update func and not call super or something, but I really recommnd just saying what you're trying to do in the long run
yea that's why the exists check is there im talking abt the active check cuz a state can still exist but not be active
fuck wrong comment ðŸ˜
you could always just override your state's update func and not call super or something, but I really recommnd just saying what you're trying to do in the long run
yea that's why the exists check is there im talking abt the active check cuz a state can still exist but not be active
I don't understand this comment
accidentally closed this, reopening
was looking through how
FlxGame
updates the game and i realized thatupdate()
just blocks the function entirely if the state isn't activethis also blocks anything else from updating, like plugins or sounds or even the cameras
couldn't you just check if the state is active in
FlxState
's tryUpdate function? i feel like this was an oversight and it doesn't really make much sense to stop the entire game from updating as a whole because a state'sactive
variable was set to false