function toggleBool(args:Array<String>):Void
{
_randomBool = !_randomBool;
}
and register a command that calls this function
DC.registerCommand(toggleBool,"toggleBool"[...]
it works perfectly and the bool toggles, but if I change the State, with FlxG.switchState or with FlxG.resetState or with FlxG.resetGame, the command keeps executing, since if I put traces inside the function, they execute, but the bool doesn't toggle. Is this a known issue and/or has solution?
So, if I have a Bool, let's call it randomBool
and a function, let's call it toggleBool
and register a command that calls this function
it works perfectly and the bool toggles, but if I change the State, with FlxG.switchState or with FlxG.resetState or with FlxG.resetGame, the command keeps executing, since if I put traces inside the function, they execute, but the bool doesn't toggle. Is this a known issue and/or has solution?