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

NoStep

parent 5e7a2c9f
......@@ -2,46 +2,25 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="0d3cb18d-e144-41a0-bc8b-4877c2e1fef1" name="默认的" comment="">
<change afterPath="$PROJECT_DIR$/resource/NoEnergyPanel/体力不足.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/StartPanel/关卡弹窗Bg.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/common/panelBgS.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/NoStepPanel/noStepCancel.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/NoStepPanel/noStepOk.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$/output.js" beforeDir="false" afterPath="$PROJECT_DIR$/output.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resource/BuyPowerPanel/增加体力背景.png" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/resource/BuyPowerPanel/无字按钮底.png" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/resource/CreditsOutPanel/积分不足背景.png" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/resource/CreditsOutPanel/赚取积分.png" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/resource/ExchangeSucPanel/兑换成功背景.png" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/resource/ExchangeSucPanel/知道啦.png" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/resource/JoinPanel/joinBg.png" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/resource/JoinPanel/joinBtn.png" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/resource/NoEnergyPanel/体力不足Bg.png" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/resource/NoEnergyPanel/体力不足按钮.png" beforeDir="false" afterPath="$PROJECT_DIR$/resource/NoEnergyPanel/体力不足按钮.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resource/StartPanel/开始闯关Bg.png" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/resource/StartPanelPrize/关卡弹窗Bg.png" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/resource/ToolsOutPanel/道具不足背景.png" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/resource/UseStep/useStepBg.png" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/resource/UseToolPanel/使用道具背景.png" beforeDir="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/res.json" beforeDir="false" afterPath="$PROJECT_DIR$/resource/res.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Main.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/Main.ts" 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/BuyPowerPanel.ts" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/panels/CreditsOutPanel.ts" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/panels/ExchangeSucPanel.ts" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/panels/JoinPanel.ts" beforeDir="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/StartPanel.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/panels/StartPanel.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/panels/StartPanelPrize.ts" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/panels/TaskPanel.ts" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/panels/ToolsOutPanel.ts" beforeDir="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/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/scene/map/CheckBtn.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/scene/map/CheckBtn.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/scene/map/MapUI.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/scene/map/MapUI.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" />
......@@ -145,7 +124,7 @@
<option name="presentableId" value="Default" />
<updated>1612576978320</updated>
<workItem from="1612576979459" duration="13000" />
<workItem from="1612577003915" duration="18185000" />
<workItem from="1612577003915" duration="19222000" />
</task>
<task id="LOCAL-00001" summary="斐乐消消乐">
<created>1612581213298</created>
......@@ -182,7 +161,14 @@
<option name="project" value="LOCAL" />
<updated>1612599420632</updated>
</task>
<option name="localTasksCounter" value="6" />
<task id="LOCAL-00006" summary="NoEnergyPanel">
<created>1612601677844</created>
<option name="number" value="00006" />
<option name="presentableId" value="LOCAL-00006" />
<option name="project" value="LOCAL" />
<updated>1612601677845</updated>
</task>
<option name="localTasksCounter" value="7" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
......@@ -196,6 +182,7 @@
<MESSAGE value="gameGuide" />
<MESSAGE value="首页引导" />
<MESSAGE value="Rule" />
<option name="LAST_COMMIT_MESSAGE" value="Rule" />
<MESSAGE value="NoEnergyPanel" />
<option name="LAST_COMMIT_MESSAGE" value="NoEnergyPanel" />
</component>
</project>
\ No newline at end of file
......@@ -3,7 +3,7 @@
"data": {
"tools": {
"HAMMERS": 1,
"STEPS": 1,
"STEPS": 0,
"BOOMS": 1
}
},
......
......@@ -183,7 +183,7 @@
"power": 523,
"tools": {
"HAMMERS": 89,
"STEPS": 103,
"STEPS": 0,
"BOOMS": 95
}
},
......
......@@ -41,7 +41,7 @@
"power": 0,
"tools": {
"HAMMERS": 9,
"STEPS": 99,
"STEPS": 0,
"BOOMS": 999
},
"topAward": {
......
......@@ -17,7 +17,7 @@
"name": "NoPrizePanel"
},
{
"keys": "步数耗尽Bg.png,步数耗尽复活.png,步数耗尽结束按钮.png",
"keys": "noStepCancel.png,noStepOk.png",
"name": "NoStepPanel"
},
{
......
......@@ -17,7 +17,7 @@ export const ResJson = {
"name": "NoPrizePanel"
},
{
"keys": "步数耗尽Bg.png,步数耗尽复活.png,步数耗尽结束按钮.png",
"keys": "noStepCancel.png,noStepOk.png",
"name": "NoStepPanel"
},
{
......
......@@ -277,66 +277,6 @@ export const SkinJson = {
}
]
},
{
"name": "NoStepPanel",
"x": 0,
"y": 0,
"type": "container",
"children": [
{
"name": "步数耗尽Bg",
"x": 55,
"y": 498,
"type": "sprite",
"props": {
"source": "步数耗尽Bg.png"
}
},
{
"name": "提示文案",
"x": 163,
"y": 661,
"type": "text",
"props": {
"text": "消耗20积分可复活 ,步数+5\n确认复活吗?",
"size": 34,
"fillColor": "#df5942",
"textAlpha": 1
},
"id": "tipsTex"
},
{
"name": "关闭按钮",
"x": 631,
"y": 470,
"type": "button",
"props": {
"tUp": "关闭按钮.png"
},
"id": "closeBtn"
},
{
"name": "步数耗尽复活",
"x": 383,
"y": 845,
"type": "button",
"props": {
"tUp": "步数耗尽复活.png"
},
"id": "liveBtn"
},
{
"name": "步数耗尽结束按钮",
"x": 93,
"y": 845,
"type": "button",
"props": {
"tUp": "步数耗尽结束按钮.png"
},
"id": "overBtn"
}
]
},
{
"name": "FailedPanel",
"x": 0,
......
......@@ -20,6 +20,8 @@ export class Tools {
alert('TODO 打开任务');
}
public static addSteps = 5;
/**
* 缓存key
*/
......
import { Panel } from "../../module/views/Panel";
import MouseEvent = FYGE.MouseEvent;
import { showPanel } from "../../module/ctrls";
import { Tools } from "../Tools";
import Button = FYGE.Button;
import { RES } from "../../module/RES";
......
import { Panel } from "../../module/views/Panel";
import { Tools } from "../Tools";
import { getCurrentScene, showPanel } from "../../module/ctrls";
import { getCurrentScene } from "../../module/ctrls";
import { RES } from "../../module/RES";
import Button = FYGE.Button;
import TextField = FYGE.TextField;
export class NoStepPanel extends Panel {
get groupNames() { return ["NoStepPanel"] }
get skinName() { return "NoStepPanel" }
overBtn: FYGE.Button;
liveBtn: FYGE.Button;
closeBtn: FYGE.Button;
tipsTex: FYGE.TextField;
get groupNames() {
return ["NoStepPanel"]
}
okBtn: Button;
cancelBtn: Button;
closeBtn: Button;
tipsTex: TextField;
data: {
reviveFun: () => void
}
initUi() {
// Tools.changeTextAlign(this.tipsTex, FYGE.TEXT_ALIGN.CENTER, 500)
this.tipsTex.textAlign = FYGE.TEXT_ALIGN.CENTER;
this.tipsTex.textWidth = 500;
this.tipsTex.x = (750 - 500) / 2;
this.tipsTex.text = "是否使用步数道具\n增加5次步数"
this.addChild(Tools.getSprite('panelBgS.png')).position.set(79, 513);
this.okBtn = this.addChild(new Button(RES.getRes('noStepOk.png')));
this.okBtn.position.set(385, 857);
this.cancelBtn = this.addChild(new Button(RES.getRes('noStepCancel.png')));
this.cancelBtn.position.set(100, 857);
this.addChild(Tools.getText(
`是否使用步数道具\n增加${Tools.addSteps}次步数?`, 33, "#744f1d",
FYGE.TEXT_ALIGN.CENTER, 750, 0, 650
));
this.addChild(Tools.getText(
"步数耗尽", 40, "#744f1d",
FYGE.TEXT_ALIGN.CENTER, 750, 0, 543
)).bold = true;
this.closeBtn = this.addChild(new Button(RES.getRes('关闭按钮.png')));
this.closeBtn.position.set(638, 488);
}
initEvents() {
//结束
[this.closeBtn, this.overBtn].forEach((e) => {
[this.closeBtn, this.cancelBtn].forEach((e) => {
e.addEventListener(FYGE.MouseEvent.CLICK, () => {
getCurrentScene().submit(false);
this.hidePanel();
}, this)
})
//复活
this.liveBtn.addEventListener(FYGE.MouseEvent.CLICK, () => {
this.okBtn.addEventListener(FYGE.MouseEvent.CLICK, () => {
//无步数道具,弹出积分兑换
if (!Tools.gameData.tools.STEPS) {
// showPanel(ToolsOutPanel, { type: PropType.STEPS, showSucPanel: false })
} else {
this.data.reviveFun();
this.hidePanel();
......
......@@ -14,7 +14,7 @@ export class UseStep extends Panel {
this.addChild(Tools.getSprite('panelBgS.png')).position.set(86, 512);
this.addChild(Tools.getText( /// TODO 道具加步数
`确定要使用步数道具+5步数吗?`, 33, '#744f1d',
`确定要使用步数道具+${Tools.addSteps}步数吗?`, 33, '#744f1d',
TEXT_ALIGN.CENTER, 750, 0, 685
));
......
......@@ -93,8 +93,8 @@ export class LoadingScene extends Scene {
.call(() => {
if (pro >= 1) {
this.removeEventListener(FYGE.Event.PROGRESS, this.progressEvent, this);
changeScene(MapScene, {from: "loading"})
// changeScene(PlayScene, { chapter: 61 });
// changeScene(MapScene, {from: "loading"})
changeScene(PlayScene, { chapter: 0 });
// changeScene(LotteryScene,{level:1});
}
})
......
......@@ -1863,7 +1863,7 @@ export class PlayScene extends Scene {
//判断步数是否为0;
if (this.steps == 0) {
//还未提示过加步数
if (!this.addedStepWarning) {
if (!this.addedStepWarning && Tools.gameData.tools.STEPS > 0) {
this.addedStepWarning = true;
//没步数弹框
showPanel(NoStepPanel, {
......@@ -1884,7 +1884,7 @@ export class PlayScene extends Scene {
})
//加步数
this.playAni(RecoverName.STEP_ANI, [stepPosition[0] - 40, stepPosition[1] + 20]);
setTimeout(() => { this.steps += 5; }, 333)
setTimeout(() => { this.steps += Tools.addSteps; }, 333)
//更新场景道具数据
this.updateScene()
}
......
......@@ -10,13 +10,13 @@ export const Chapters1: ChapterData[] = [
{
baseElementTypes: [0, 1, 2, 3],
bubbleProbability: 0,
stepCount: 25,
stepCount: 1,
passTarget: {
type: PassType.ELEMENT_TARGET,
elements: [
{
type: ElementType.CHICKEN,
count: 1,
count: 111,
},
],
},
......
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