|
|
@@ -49,6 +49,7 @@ export default class Game extends cc.Component {
|
|
|
this.initBtns();
|
|
|
this.initQiPaos();
|
|
|
this.initInfo();
|
|
|
+ this.autoOpenPanel();
|
|
|
|
|
|
// if(gData.gameData.isNewPlayer()){
|
|
|
// this.initGuide();
|
|
|
@@ -117,6 +118,20 @@ export default class Game extends cc.Component {
|
|
|
this.img_head.spriteFrame = new cc.SpriteFrame(result);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 自动打开面板
|
|
|
+ * - isAutoOpenPanel 1自动开 2不自动开 其他不处理
|
|
|
+ */
|
|
|
+ private autoOpenPanel() {
|
|
|
+ const isAutoOpenPanel = gData.gameData.getProp(GameProp.isAutoOpenPanel);
|
|
|
+ if (isAutoOpenPanel == 1) {
|
|
|
+ mk.ui.openPanel('module/pigBank/pigBank');
|
|
|
+ } else if (isAutoOpenPanel != 2) {
|
|
|
+ // 未定义,给初始值
|
|
|
+ gData.gameData.setProp(GameProp.isAutoOpenPanel, 1)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
//测试道具获取效果
|
|
|
private testFly() {
|
|
|
mk.fly.PlayCoinAnim(1, 20, cc.v2(0, -300), cc.v2(0, 0));
|