Commit 3d51b511 authored by 邱旭's avatar 邱旭

Failed

parent 3a6a2136
......@@ -2,25 +2,16 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="0d3cb18d-e144-41a0-bc8b-4877c2e1fef1" name="默认的" comment="">
<change afterPath="$PROJECT_DIR$/resource/NoStepPanel/noStepCancel.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/NoStepPanel/noStepOk.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/FailedPanel/failedBtn.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/FailedPanel/failedTxt.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/mock/miniTb/babycare.consumerTools.json" beforeDir="false" afterPath="$PROJECT_DIR$/mock/miniTb/babycare.consumerTools.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/mock/miniTb/babycare.getGameInfo.json" beforeDir="false" afterPath="$PROJECT_DIR$/mock/miniTb/babycare.getGameInfo.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/mock/miniTb/babycare.getIndex.json" beforeDir="false" afterPath="$PROJECT_DIR$/mock/miniTb/babycare.getIndex.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resource/NoStepPanel/步数耗尽Bg.png" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/resource/NoStepPanel/步数耗尽复活.png" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/resource/NoStepPanel/步数耗尽结束按钮.png" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/resource/FailedPanel/失败Bg.png" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/resource/FailedPanel/失败重新闯关.png" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/resource/res.json" beforeDir="false" afterPath="$PROJECT_DIR$/resource/res.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/ResJson.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/ResJson.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/SkinJson.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/SkinJson.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Tools.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/Tools.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/panels/NoEnergyPanel.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/panels/NoEnergyPanel.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/panels/NoStepPanel.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/panels/NoStepPanel.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/panels/UseStep.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/panels/UseStep.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/panels/FailedPanel.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/panels/FailedPanel.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/scene/LoadingScene.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/scene/LoadingScene.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/scene/PlayScene.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/scene/PlayScene.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/something/chapters/Chapter1.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/something/chapters/Chapter1.ts" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
......@@ -124,7 +115,7 @@
<option name="presentableId" value="Default" />
<updated>1612576978320</updated>
<workItem from="1612576979459" duration="13000" />
<workItem from="1612577003915" duration="19222000" />
<workItem from="1612577003915" duration="19756000" />
</task>
<task id="LOCAL-00001" summary="斐乐消消乐">
<created>1612581213298</created>
......@@ -168,7 +159,14 @@
<option name="project" value="LOCAL" />
<updated>1612601677845</updated>
</task>
<option name="localTasksCounter" value="7" />
<task id="LOCAL-00007" summary="NoStep">
<created>1612602696160</created>
<option name="number" value="00007" />
<option name="presentableId" value="LOCAL-00007" />
<option name="project" value="LOCAL" />
<updated>1612602696160</updated>
</task>
<option name="localTasksCounter" value="8" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
......@@ -183,6 +181,7 @@
<MESSAGE value="首页引导" />
<MESSAGE value="Rule" />
<MESSAGE value="NoEnergyPanel" />
<option name="LAST_COMMIT_MESSAGE" value="NoEnergyPanel" />
<MESSAGE value="NoStep" />
<option name="LAST_COMMIT_MESSAGE" value="NoStep" />
</component>
</project>
\ No newline at end of file
{
"groups": [
{
"keys": "失败Bg.png,失败重新闯关.png",
"keys": "failedBtn.png,failedTxt.png",
"name": "FailedPanel"
},
{
......
export const ResJson = {
"groups": [
{
"keys": "失败Bg.png,失败重新闯关.png",
"keys": "failedBtn.png,failedTxt.png",
"name": "FailedPanel"
},
{
......
......@@ -277,70 +277,6 @@ export const SkinJson = {
}
]
},
{
"name": "FailedPanel",
"x": 0,
"y": 0,
"type": "container",
"children": [
{
"name": "失败Bg",
"x": 55,
"y": 276,
"type": "sprite",
"props": {
"source": "失败Bg.png"
}
},
{
"name": "关卡文字",
"x": 300,
"y": 521,
"type": "text",
"props": {
"text": "第 24 关",
"size": 40,
"fillColor": "#df5942",
"textAlpha": 1,
"bold": true
},
"id": "checkTex"
},
{
"name": "提示文案",
"x": 224,
"y": 611,
"type": "text",
"props": {
"text": "再接再厉!\n再闯3关可参与抽奖!",
"size": 36,
"fillColor": "#df5942",
"textAlpha": 1
},
"id": "tipsTex"
},
{
"name": "关闭按钮",
"x": 631,
"y": 470,
"type": "button",
"props": {
"tUp": "关闭按钮.png"
},
"id": "closeBtn"
},
{
"name": "失败重新闯关",
"x": 163,
"y": 957,
"type": "button",
"props": {
"tUp": "失败重新闯关.png"
},
"id": "againBtn"
}
]
},
{
"name": "StartPanel",
"x": 0,
......
import { Panel } from "../../module/views/Panel";
import { Tools } from "../Tools";
import TEXT_ALIGN = FYGE.TEXT_ALIGN;
import MouseEvent = FYGE.MouseEvent;
import { changeScene } from "../../module/ctrls";
import { MapScene } from "../scene/map/MapScene";
import { RES } from "../../module/RES";
import MouseEvent = FYGE.MouseEvent;
import Button = FYGE.Button;
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() {
this.checkTex.text = `第\t${this.data.level}\t关`;
this.checkTex.textAlign = TEXT_ALIGN.CENTER;
this.checkTex.x = 2;
this.checkTex.textWidth = 750;
const curLevel: number = Tools.gameData.currentLevel;
let upLevel: number = 120;
let dLevel: number = 120;
Tools.baseInfo.prizeLevels.forEach((value, index) => {
const d: number = value - curLevel;
if (curLevel <= value && d >= 0 && d <= dLevel) {
upLevel = value;
dLevel = d + 1;
}
});
this.tipsTex.text = `\t\t\t再接再厉!\n再解锁${dLevel}关可参与抽奖`;
this.tipsTex.textAlign = TEXT_ALIGN.CENTER;
this.tipsTex.textWidth = 750;
this.tipsTex.x = 0;
this.addChild(Tools.getSprite('panelBgS.png')).position.set(79, 513);
this.addChild(Tools.getSprite('failedTxt.png')).position.set(171, 582);
if (Tools.gameData.currentLevel == 120
&& MapScene.checkArr && MapScene.checkArr[120]
&& MapScene.checkArr[120].checkData.isVisitSuccess) {
this.tipsTex.text = '';
}
this.addChild(new Button(RES.getRes("failedBtn.png")))
.addEventListener(MouseEvent.CLICK, this.again, this)
.position.set(171, 830);
this.addChild(new Button(RES.getRes('关闭按钮.png')))
.addEventListener(MouseEvent.CLICK, this.hidePanel, this)
.position.set(638, 488);
}
start(data) {
......@@ -60,14 +38,4 @@ export class FailedPanel extends Panel {
changeScene(MapScene, {level: this.data.level});
super.hidePanel();
}
initEvents() {
super.initEvents();
this.againBtn.addEventListener(MouseEvent.CLICK, this.again, this);
}
removeEvents() {
super.removeEvents();
this.againBtn.removeEventListener(MouseEvent.CLICK, this.again, this);
}
}
......@@ -94,7 +94,7 @@ export class LoadingScene extends Scene {
if (pro >= 1) {
this.removeEventListener(FYGE.Event.PROGRESS, this.progressEvent, this);
// changeScene(MapScene, {from: "loading"})
changeScene(PlayScene, { chapter: 0 });
changeScene(PlayScene, { chapter: 1 });
// changeScene(LotteryScene,{level:1});
}
})
......
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