Commit 2e2ca461 authored by wjf's avatar wjf

l

parents fefdbd91 53f0d1bd
This diff is collapsed.
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"message": "OK", "message": "OK",
"data": { "data": {
"power": 100, "power": 100,
"currentLevel": 4, "currentLevel": 1,
"tools": { "tools": {
"STEPS": 1, "STEPS": 1,
"BOOMS": 2, "BOOMS": 2,
...@@ -14,6 +14,9 @@ ...@@ -14,6 +14,9 @@
{ {
"level": 5 "level": 5
}, },
{
"level": 4
},
{ {
"level": 1 "level": 1
} }
...@@ -45,7 +48,56 @@ ...@@ -45,7 +48,56 @@
"scores": 44444, "scores": 44444,
"stars": 2, "stars": 2,
"isPrizeLevel": false, "isPrizeLevel": false,
"isVisitSuccess": false "isVisitSuccess": true
},
{
"level": 5,
"scores": 44444,
"stars": 2,
"isPrizeLevel": false,
"isVisitSuccess": true
},
{
"level": 6,
"scores": 44444,
"stars": 2,
"isPrizeLevel": false,
"isVisitSuccess": true
},
{
"level": 7,
"scores": 44444,
"stars": 2,
"isPrizeLevel": false,
"isVisitSuccess": true
},
{
"level": 4,
"scores": 44444,
"stars": 2,
"isPrizeLevel": false,
"isVisitSuccess": true
},
{
"level": 8,
"scores": 44444,
"stars": 2,
"isPrizeLevel": false,
"isVisitSuccess": true
},
{
"level": 9,
"scores": 44444,
"stars": 2,
"isPrizeLevel": false,
"isVisitSuccess": true
},
{
"level": 10,
"scores": 44444,
"stars": 2,
"isPrizeLevel": false,
"isVisitSuccess": true
} }
], ],
"isFristLogin": false "isFristLogin": false
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
import { Panel } from "../../module/views/Panel";
export class BuyPowerPanel extends Panel {
get groupNames() {
return ["BuyPowerPanel"]
}
get skinName() {
return "BuyPowerPanel"
}
msgTxt: FYGE.TextField;
exchangeBtn: FYGE.Button;
closeBtn: FYGE.Button;
initUi() {
}
start(data) {
super.start();
}
initEvents() {
super.initEvents();
}
removeEvents() {
super.removeEvents();
}
}
import { Panel } from "../../module/views/Panel";
export class ExchangeSucPanel extends Panel {
get groupNames() { return ["ExchangeSucPanel"] }
get skinName() { return "ExchangeSucPanel" }
knowBtn:FYGE.Button;
closeBtn:FYGE.Button;
initUi() {
}
start(data) {
super.start();
}
initEvents() {
super.initEvents();
}
removeEvents() {
super.removeEvents();
}
}
import { Panel } from "../../module/views/Panel";
export class FailedPanel extends Panel {
get groupNames() { return ["FailedPanel"] }
get skinName() { return "FailedPanel" }
againBtn:FYGE.Button;
closeBtn:FYGE.Button;
tipsTex:FYGE.TextField;
checkTex:FYGE.TextField;
initUi() {
}
start(data) {
super.start();
}
initEvents() {
super.initEvents();
}
removeEvents() {
super.removeEvents();
}
}
import { Panel } from "../../module/views/Panel";
export class FreePowerPanel extends Panel {
get groupNames() { return ["FreePowerPanel"] }
get skinName() { return "FreePowerPanel" }
acceptBtn:FYGE.Button;
closeBtn:FYGE.Button;
initUi() {
}
start(data) {
super.start();
}
initEvents() {
super.initEvents();
}
removeEvents() {
super.removeEvents();
}
}
import { Panel } from "../../module/views/Panel";
import TextField = FYGE.TextField;
import TEXT_lINETYPE = FYGE.TEXT_lINETYPE;
import ScrollPage = FYGE.ScrollPage;
import { Tools } from "../Tools";
export class RulePanel extends Panel {
get groupNames() {
return ["RulePanel"]
}
get skinName() {
return "RulePanel"
}
closeBtn: FYGE.Button;
ruleTex: TextField;
scroll: ScrollPage;
initUi() {
}
start(data) {
super.start();
const rule = '1、这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案。\\n\\r2、这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案。\\r\\r3、这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案。\\r\\r4、这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案。1、这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案。\\n\\r2、这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案。\\r\\r3、这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案。\\r\\r4、这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案。1、这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案。\\n\\r2、这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案。\\r\\r3、这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案。\\r\\r4、这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案,这里是活动规则文案。'
this.ruleTex = this.addChild(Tools.getText(
rule, 26, '#892a1a',
FYGE.TEXT_ALIGN.LEFT, 570
));
this.ruleTex.lineType = TEXT_lINETYPE.MULTI;
this.scroll = this.addChild(new ScrollPage(
570, 600, this.ruleTex.textHeight + 30
));
this.scroll.position.set(96, 549);
this.scroll.view.addChild(this.ruleTex);
}
initEvents() {
super.initEvents();
}
removeEvents() {
super.removeEvents();
}
}
import { Panel } from "../../module/views/Panel"; import { Panel } from "../../module/views/Panel";
import TEXT_ALIGN = FYGE.TEXT_ALIGN;
import { getChapterData } from "../something/chapters/getChapter"; import { getChapterData } from "../something/chapters/getChapter";
import { Tools } from "../Tools";
import { ElementTargetData } from "../something/interface/ElementTargetData";
import Container = FYGE.Container; import Container = FYGE.Container;
import TEXT_ALIGN = FYGE.TEXT_ALIGN;
import MouseEvent = FYGE.MouseEvent;
import { changeScene } from "../../module/ctrls";
import { PlayScene } from "../scene/PlayScene";
import Tween = FYGE.Tween;
import Ease = FYGE.Ease;
export class StartPanel extends Panel { export class StartPanel extends Panel {
get groupNames() { get groupNames() {
...@@ -18,28 +25,61 @@ export class StartPanel extends Panel { ...@@ -18,28 +25,61 @@ export class StartPanel extends Panel {
startBtn2: FYGE.Button; startBtn2: FYGE.Button;
startBtn: FYGE.Button; startBtn: FYGE.Button;
public showAni() {
if (this.isShowing) return;
this.isShowing = true;
this.anchor.set(375, 812);
Tween.get(this)
.set({scaleX: 0, scaleY: 0})
.to({scaleX: 1, scaleY: 1}, 400, Ease.backOut)
.call(() => {
this.isShowing = false;
});
}
initUi() { initUi() {
this.checkTex.textWidth = 750; this.checkTex.textWidth = 750;
this.checkTex.textAlign = TEXT_ALIGN.CENTER; this.checkTex.textAlign = TEXT_ALIGN.CENTER;
this.checkTex.x = 0; this.checkTex.x = 0;
this.checkTex.text = `第 ${this.data.check} 关`; this.checkTex.text = `第 ${this.data.level} 关`;
this.startBtn.visible = !this.data.isPlayed;
this.startBtn2.visible = this.data.isPlayed;
this.addChild(new StartTarget(this.data.level))
.position.set(0, 682);
this.addChild(new StartTarget(this.data.check)); this.tipsTex.visible = this.data.stars < 3;
} }
start(data) { start(data) {
super.start(); super.start();
} }
private startGame() {
changeScene(PlayScene, {chapter: this.data.level});
this.hidePanel();
}
initEvents() { initEvents() {
super.initEvents(); super.initEvents();
this.startBtn.addEventListener(MouseEvent.CLICK, this.startGame, this);
this.startBtn2.addEventListener(MouseEvent.CLICK, this.startGame, this);
} }
removeEvents() { removeEvents() {
super.removeEvents(); super.removeEvents();
this.startBtn.removeEventListener(MouseEvent.CLICK, this.startGame, this);
this.startBtn2.removeEventListener(MouseEvent.CLICK, this.startGame, this);
} }
} }
const pos = [
[325],
[240, 410],
[180, 325, 470],
]
export class StartTarget extends Container { export class StartTarget extends Container {
constructor(checkNum: number) { constructor(checkNum: number) {
super(); super();
...@@ -48,8 +88,42 @@ export class StartTarget extends Container { ...@@ -48,8 +88,42 @@ export class StartTarget extends Container {
if (passTarget.type == 0) { // 分数 if (passTarget.type == 0) { // 分数
} else if (passTarget.type == 1) { // 消除元素个数 } else if (passTarget.type == 1) { // 消除元素个数
passTarget.elements.forEach((v, i) => {
const targetItem = this.addChild(new StartTargetItem(v));
targetItem.x = pos[passTarget.elements.length - 1][i];
setTimeout(() => {
targetItem.playEffect();
}, i * 200);
});
} }
} }
} }
export class StartTargetItem extends Container {
constructor(data: ElementTargetData) {
super();
const targetImg = this.addChild(Tools.getSprite(`ele${data.type}.png`));
targetImg.width = targetImg.height = 100;
const targetTex = this.addChild(Tools.getText(
`${data.count}`, 30, '#ffffff',
TEXT_ALIGN.CENTER, 100, 0, 108
));
targetTex.strokeColor = '#eb5b57';
targetTex.stroke = 3;
this.anchor.set(50, 79);
this.scale.set(0, 0);
}
// 变大的动效
public playEffect() {
Tween.get(this)
.set({scaleX: 0, scaleY: 0})
.to({scaleX: 1, scaleY: 1}, 500, Ease.backOut)
}
}
import { Panel } from "../../module/views/Panel";
import MouseEvent = FYGE.MouseEvent;
import { changeScene } from "../../module/ctrls";
import { PlayScene } from "../scene/PlayScene";
import { StartTarget } from "./StartPanel";
import TEXT_ALIGN = FYGE.TEXT_ALIGN;
import Tween = FYGE.Tween;
import Ease = FYGE.Ease;
export class StartPanelPrize extends Panel {
get groupNames() {
return ["StartPanelPrize"]
}
get skinName() {
return "StartPanelPrize"
}
public showAni() {
if (this.isShowing) return;
this.isShowing = true;
this.anchor.set(375, 812);
Tween.get(this)
.set({scaleX: 0, scaleY: 0})
.to({scaleX: 1, scaleY: 1}, 400, Ease.backOut)
.call(() => {
this.isShowing = false;
});
}
closeBtn: FYGE.Button;
startBtn: FYGE.Button;
startBtn2: FYGE.Button;
tipsTex: FYGE.TextField;
checkTex: FYGE.TextField;
initUi() {
this.checkTex.textWidth = 750;
this.checkTex.textAlign = TEXT_ALIGN.CENTER;
this.checkTex.x = 0;
this.checkTex.text = `第 ${this.data.level} 关`;
this.startBtn.visible = !this.data.isPlayed;
this.startBtn2.visible = this.data.isPlayed;
this.addChild(new StartTarget(this.data.level))
.position.set(0, 682);
}
start(data) {
super.start();
}
private startGame() {
changeScene(PlayScene, {chapter: this.data.level});
this.hidePanel();
}
initEvents() {
super.initEvents();
this.startBtn.addEventListener(MouseEvent.CLICK, this.startGame, this);
this.startBtn2.addEventListener(MouseEvent.CLICK, this.startGame, this);
}
removeEvents() {
super.removeEvents();
this.startBtn.removeEventListener(MouseEvent.CLICK, this.startGame, this);
this.startBtn2.removeEventListener(MouseEvent.CLICK, this.startGame, this);
}
}
import { Panel } from "../../module/views/Panel";
export class SuccessNoPrizePanel extends Panel {
get groupNames() { return ["SuccessNoPrizePanel"] }
get skinName() { return "SuccessNoPrizePanel" }
closeBtn:FYGE.Button;
tipsTex:FYGE.TextField;
checkTex:FYGE.TextField;
againBtn:FYGE.Button;
continueBtn:FYGE.Button;
totalContinueBtn:FYGE.Button;
initUi() {
}
start(data) {
super.start();
}
initEvents() {
super.initEvents();
}
removeEvents() {
super.removeEvents();
}
}
import { Panel } from "../../module/views/Panel";
export class SuccessPrizePanel extends Panel {
get groupNames() { return ["SuccessPrizePanel"] }
get skinName() { return "SuccessPrizePanel" }
closeBtn:FYGE.Button;
tipsTex:FYGE.TextField;
checkTex:FYGE.TextField;
againBtn:FYGE.Button;
noPrizeAgainBtn:FYGE.Button;
initUi() {
}
start(data) {
super.start();
}
initEvents() {
super.initEvents();
}
removeEvents() {
super.removeEvents();
}
}
import { Panel } from "../../module/views/Panel";
import { layers } from "../../module/views/layers";
import Tween = FYGE.Tween;
import Ease = FYGE.Ease;
import Button = FYGE.Button;
export class TaskPanel extends Panel {
get groupNames() {
return ["TaskPanel"]
}
get skinName() {
return "TaskPanel"
}
public showAni() {
if (this.isShowing) return;
this.isShowing = true;
let oriY = 1624 - this.height - layers.stageOffsetY - 580;
this.y = layers.stageHeight + this.height;
Tween.get(this)
.to({y: oriY}, 500, Ease.quartOut)
.call(() => {
this.isShowing = false;
});
}
closeBtn: Button;
taskBtn1: Button;
taskBtn2: Button;
taskBtn3: Button;
taskBtn4: Button;
initUi() {
}
start(data) {
super.start();
}
initEvents() {
super.initEvents();
}
removeEvents() {
super.removeEvents();
}
}
import { Panel } from "../../module/views/Panel";
export class ToolsOutPanel extends Panel {
get groupNames() { return ["ToolsOutPanel"] }
get skinName() { return "ToolsOutPanel" }
consideBtn:FYGE.Button;
sureBtn:FYGE.Button;
closeBtn:FYGE.Button;
msgTxt:FYGE.TextField;
initUi() {
}
start(data) {
super.start();
}
initEvents() {
super.initEvents();
}
removeEvents() {
super.removeEvents();
}
}
import { Panel } from "../../module/views/Panel";
export class UseToolPanel extends Panel {
get groupNames() { return ["UseToolPanel"] }
get skinName() { return "UseToolPanel" }
consideBtn:FYGE.Button;
sureBtn:FYGE.Button;
closeBtn:FYGE.Button;
msgTxt:FYGE.TextField;
initUi() {
}
start(data) {
super.start();
}
initEvents() {
super.initEvents();
}
removeEvents() {
super.removeEvents();
}
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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