Commit ecd4fc12 authored by haiyoucuv's avatar haiyoucuv

1

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