Browse Source

Merge pull request #894 from vousk/patch_actions-2

Gives ability to skip current prepared Action for the next one
David Catuhe 9 năm trước cách đây
mục cha
commit
96622916b2
1 tập tin đã thay đổi với 9 bổ sung5 xóa
  1. 9 5
      src/Actions/babylon.action.ts

+ 9 - 5
src/Actions/babylon.action.ts

@@ -53,6 +53,14 @@
 
             this._nextActiveAction.execute(evt);
 
+            this.skipToNextActiveAction();
+        }
+
+        public execute(evt: ActionEvent): void {
+
+        }
+
+        public skipToNextActiveAction(): void {
             if (this._nextActiveAction._child) {
 
                 if (!this._nextActiveAction._child._actionManager) {
@@ -64,11 +72,7 @@
                 this._nextActiveAction = this;
             }
         }
-
-        public execute(evt: ActionEvent): void {
-
-        }
-
+        
         public then(action: Action): Action {
             this._child = action;