Commit ecd4fc12 authored by haiyoucuv's avatar haiyoucuv

1

parent a5fbe958
......@@ -6,6 +6,8 @@
"activityId": "string",
"openId": "string",
"inviteId": "string",
"isFollow": true
"isFollow": true,
"isFirstLogin": true,
"loginAddPower": false
}
}
{
"code": "000000",
"data": {
"currentLevel": 2,
"currentLevel": 1,
"isFirstLogin": false,
"records": [{
"score": 0,
......
......@@ -31,6 +31,8 @@ export class Tools {
"openId": string,
"inviteId": string,
"isFollow": boolean,
"isFirstLogin": boolean,
"loginAddPower": boolean,
}
public static async getAppData() {
......@@ -77,8 +79,6 @@ export class Tools {
level100: string,
level120: string
},
loginAddPower: boolean,
isFirstLogin: boolean, //是否是首次
};// 活动基本信息
public static getBaseInfo() {
......
......@@ -323,10 +323,10 @@ export class PlayScene extends Scene {
} else {
this.enableMouseEvt(true);
//首次送道具,的动画先出,然后再出引导
if (this.chapter == 1 && Tools.baseInfo.isFirstLogin) {
if (this.chapter == 1 && Tools.globalData.isFirstLogin) {
this.addChild(new FirstPropGift())
.once(FYGE.MouseEvent.CLICK, (e: FYGE.MouseEvent) => {
Tools.baseInfo.isFirstLogin = false;
Tools.globalData.isFirstLogin = false;
//移除自己
this.removeChild(e.target)
//游戏引导
......
......@@ -51,9 +51,9 @@ export class MapScene extends Scene {
this.initMap();
this.updateMapCheck();
if (Tools.baseInfo.loginAddPower && !Tools.baseInfo.isFirstLogin) {
if (Tools.globalData.loginAddPower && !Tools.globalData.isFirstLogin) {
showPanel(FreePowerPanel);
Tools.baseInfo.loginAddPower = false;
Tools.globalData.loginAddPower = false;
}
}
......@@ -62,7 +62,7 @@ export class MapScene extends Scene {
if (this.data && this.data.from == 'loading') {
this.uiLayer = this.addChild(new MapUI());
this.initMapByData();
if (Tools.baseInfo.isFirstLogin) {
if (Tools.globalData.isFirstLogin) {
this.initGuide();
}
} else {
......@@ -77,11 +77,10 @@ export class MapScene extends Scene {
private initGuide() {
//有bug再说
// Tools.gameData.isFirstLogin = false;
// Tools.globalData.isFirstLogin = false;
const guide = this.addChild(new Container());
guide.y = -layers.stageOffsetY;
guide.y = -layers.stageOffsetY;
const g = guide.addChild(new Graphics());
g.beginFill(0, 0.6);
g.drawRect(0, 0, 750, 1624);
......@@ -94,10 +93,10 @@ export class MapScene extends Scene {
mapGuide.mouseEnable = false;
const guide_check = guide.addChild(new CheckBtn({check: 1}));
const guide_check = guide.addChild(new CheckBtn({ check: 1 }));
guide_check.enabled = true;
guide_check.type = CHECK_TYPE.CUR;
guide_check.position.set(MapScene.checkArr[1].x, MapScene.checkArr[1].y);
guide_check.position.set(MapScene.checkArr[1].x, MapScene.checkArr[1].y + 140 * layers.stageOffsetY / 812);
guide_check.addChild(new MapAvatar());
const guide_hand = guide.addChild(Tools.getSprite('guide_hand.png'));
......@@ -121,7 +120,7 @@ export class MapScene extends Scene {
guide.alpha = 0;
Tween.get(guide)
.to({alpha: 1}, 600, Ease.quadInOut);
.to({ alpha: 1 }, 600, Ease.quadInOut);
// Tween.get(guide_fox)
// .wait(300)
......@@ -179,7 +178,7 @@ export class MapScene extends Scene {
const arr = new Array(120);
for (let i = 0; i < 120; i++) {
arr[i] = {check: i + 1};
arr[i] = { check: i + 1 };
}
arr.reverse();
......@@ -246,7 +245,7 @@ export class MapScene extends Scene {
if (Tools.globalData.inviteId) {
sendTbNet(TbNetName.doHelp, { inviteId: Tools.globalData.inviteId },
(success, res) => {
if(success)showToast('助力成功');
if (success) showToast('助力成功');
// if (success) Tools.globalData.inviteId = null;
}
);
......
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