When attaching actions to triggers for a state which is current, the actions won't be used as expected until the next cycling of the action state.
For example, say the current state is TriggerState.ACTIVE, and someone invokes Trigger.whenActive with some action, this action won't be started.
The root for this is that the updates to attached actions are only done in GenericTrigger.update (called by the scheduler), which only updates the actions if the state has changed.
Problem is, we can't simply act on the actions via the attach methods (like Trigger.whenActive) because it is only allowed (and possible) via GenericTrigger.update. So either we change this, or create some list which registers newly attached actions, and in update perform special handling for them.
When attaching actions to triggers for a state which is current, the actions won't be used as expected until the next cycling of the action state.
For example, say the current state is
TriggerState.ACTIVE, and someone invokesTrigger.whenActivewith some action, this action won't be started.The root for this is that the updates to attached actions are only done in
GenericTrigger.update(called by the scheduler), which only updates the actions if the state has changed.Problem is, we can't simply act on the actions via the attach methods (like
Trigger.whenActive) because it is only allowed (and possible) viaGenericTrigger.update. So either we change this, or create some list which registers newly attached actions, and inupdateperform special handling for them.