You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The RepeatForever action in Excalibur.js currently loops indefinitely, providing no built-in mechanism for resetting the action once it is in progress. In scenarios where more control over the flow of repeated actions is required (e.g., restarting the animation after a specific event or condition), developers are left without an efficient way to manage these actions.
The current implementation of RepeatForever does not allow for resetting the action, which can be limiting for game developers who need more flexibility in controlling repeated actions.
Developers may need to manually recreate or manage actions outside the RepeatForever context, leading to extra complexity and potential bugs.
Proposal
stop method
This method will stop all actions in the repeat cycle, preventing further execution of the repeated actions while maintaining the current state of the actor.
Once stopped, the action should remain halted until explicitly resumed or reset.
This method will reset the RepeatForever action, allowing it to restart from its initial state. The actor will return to its default position, and the repeated actions will be reinitialized.
After calling reset(), the repeated actions should begin again from the start, as if it was newly created.
public reset(): void {
this._stopped = false;
this._actionQueue.reset();
}
The text was updated successfully, but these errors were encountered:
Context
The RepeatForever action in Excalibur.js currently loops indefinitely, providing no built-in mechanism for resetting the action once it is in progress. In scenarios where more control over the flow of repeated actions is required (e.g., restarting the animation after a specific event or condition), developers are left without an efficient way to manage these actions.
Proposal
stop
methodreset
methodreset()
, the repeated actions should begin again from the start, as if it was newly created.The text was updated successfully, but these errors were encountered: