Commit 4f4ed69a authored by liujiangnan's avatar liujiangnan

feat

parent dcb010f0
......@@ -57,7 +57,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.rootAttrTree = this.getComponent('Attributes');
this.initBg();
this.initUnitViewPager();
this.createFiniteStateMachines();
await this.createFiniteStateMachines();
const BackViewButtons = this.rootAttrTree.querySelectorAll('.back-view');
BackViewButtons.forEach(b => {
buttonOnClick(b, ()=> {
......@@ -227,7 +227,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
cc.audioEngine.playMusic(audio, true);
}
createFiniteStateMachines() {
return new Promise((resolve) => {
let pid = 21228; // 本地测试用
let pname = 'level 1'; // 本地测试用
const middleLayer = cc.find('middleLayer');
......@@ -375,6 +375,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
ctx.UnitViewData = list;
ctx.currentDataset = list;
}
resolve();
});
},
......@@ -395,6 +396,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
console.log(1, state);
});
});
}
setStateContextData({ rows, buttonsKey }) {
const buttons = buttonsKey;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment