@urso/core 0.2.1-dev → 0.2.2-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@urso/core",
3
- "version": "0.2.01-dev",
3
+ "version": "0.2.02-dev",
4
4
  "description": "HTML5 game engine",
5
5
  "main": "build/js/index.js",
6
6
  "author": "Megbrimef",
@@ -44,6 +44,7 @@ class ComponentsStateDrivenController extends ComponentsBaseController {
44
44
  }
45
45
 
46
46
  _subscribeOnce() {
47
+ //do not forget use super._subscribeOnce() , if you will use _subscribeOnce in the component
47
48
  this._processStates();
48
49
  this._processActions();
49
50
  }
@@ -22,7 +22,7 @@ class ModulesStatesManagerConfigStates {
22
22
  { action: 'showPickGame' }, //showPickGame --> addActionGuard(showPickGame, funk)
23
23
  { action: 'showBIGWin' }
24
24
  ],
25
- nextState: ["PICK_GAME2", "PICK_GAME1", "IDLE"] //setGuardState(PICK_GAME2, func)
25
+ nextState: ["PICK_GAME2", "PICK_GAME1", "IDLE"] //nextState is optional //setGuardState(PICK_GAME2, func)
26
26
  },
27
27
 
28
28
  PICK_GAME2: {
@@ -30,7 +30,7 @@ class ModulesStatesManagerConfigStates {
30
30
  { action: 'showWheel' }, //showWheel --> addActionGuard(showWheel, funk)
31
31
  { action: 'showBIGWin' }
32
32
  ],
33
- nextState: ["PICK_GAME1", "IDLE"]
33
+ nextState: ["PICK_GAME1", "IDLE"] //nextState is optional
34
34
  },
35
35
 
36
36
  WINLINES_ANIMATE_BY_ONE: { action: 'showWinlinesAnimation' },
@@ -85,7 +85,7 @@ class ModulesStatesManagerController {
85
85
 
86
86
  //actions guards
87
87
  addActionGuard(key, guard) {
88
- this.actionsGuards.add(key, guard);
88
+ this.actionsGuards.add(key, guard, true);
89
89
  }
90
90
 
91
91
  checkActionGuard(key) {
@@ -116,7 +116,7 @@ class ModulesStatesManagerController {
116
116
 
117
117
  //states guards
118
118
  setStateGuard(key, guard) {
119
- this.statesGuards.add(key, guard);
119
+ this.statesGuards.add(key, guard, true);
120
120
  }
121
121
 
122
122
  checkStateGuard(key) {
@@ -6,8 +6,8 @@ class ModulesStatesManagerFunctionsStorage {
6
6
  }
7
7
 
8
8
  //guards
9
- add(key, guard) {
10
- this._addToStorage(key, guard, true);
9
+ add(key, guard, onlyOneFlag = false) {
10
+ this._addToStorage(key, guard, onlyOneFlag);
11
11
  }
12
12
 
13
13
  run(key) {