Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GameManager.game.currentScene.toolHandler.addActionToTimeline = (
- n => function(t) {
- // Trim timeline if it exceeds the maximum allowed actions
- if (this.actionTimeline.length >= n) {
- this.actionTimeline.splice(0, this.actionTimeline.length - n);
- this.actionTimelinePointer = n;
- }
- // Remove any actions ahead of the current pointer
- this.actionTimeline.splice(this.actionTimelinePointer);
- // Add the new action
- this.actionTimeline.push(t);
- this.actionTimelinePointer++;
- }
- )(100).bind(GameManager.game.currentScene.toolHandler);
Advertisement
Add Comment
Please, Sign In to add comment