Commit 7882d1ae authored by 邱旭's avatar 邱旭

m

parent d4537668
......@@ -3,10 +3,14 @@
<component name="ChangeListManager">
<list default="true" id="0d3cb18d-e144-41a0-bc8b-4877c2e1fef1" name="默认的" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/panels/SuccessNoPrizePanel.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/panels/SuccessNoPrizePanel.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/panels/SuccessPrizePanel.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/panels/SuccessPrizePanel.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/LotteryScene.ts" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/output.js" beforeDir="false" afterPath="$PROJECT_DIR$/output.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/output.js.map" beforeDir="false" afterPath="$PROJECT_DIR$/output.js.map" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/ResJson.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/ResJson.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/TaoBaoNet.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/TaoBaoNet.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/scene/PlayScene.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/scene/PlayScene.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/scene/map/MapUI.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/scene/map/MapUI.ts" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
......@@ -65,7 +69,7 @@
<recent name="$PROJECT_DIR$/lotties" />
</key>
</component>
<component name="RunManager" selected="npm.flushRes">
<component name="RunManager" selected="npm.buildTS">
<configuration name="build" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" />
<command value="run" />
......@@ -76,41 +80,41 @@
<envs />
<method v="2" />
</configuration>
<configuration name="copyJs" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
<configuration name="buildTS" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" />
<command value="run" />
<scripts>
<script value="copyJs" />
<script value="buildTS" />
</scripts>
<node-interpreter value="project" />
<envs />
<method v="2" />
</configuration>
<configuration name="dev" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
<configuration name="copyJs" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" />
<command value="run" />
<scripts>
<script value="dev" />
<script value="copyJs" />
</scripts>
<node-interpreter value="project" />
<envs />
<method v="2" />
</configuration>
<configuration name="flushRes" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
<configuration name="dev" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" />
<command value="run" />
<scripts>
<script value="flushRes" />
<script value="dev" />
</scripts>
<node-interpreter value="project" />
<envs />
<method v="2" />
</configuration>
<configuration name="handleLotS" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
<configuration name="flushRes" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" />
<command value="run" />
<scripts>
<script value="handleLotS" />
<script value="flushRes" />
</scripts>
<node-interpreter value="project" />
<envs />
......@@ -118,11 +122,11 @@
</configuration>
<recent_temporary>
<list>
<item itemvalue="npm.flushRes" />
<item itemvalue="npm.buildTS" />
<item itemvalue="npm.build" />
<item itemvalue="npm.flushRes" />
<item itemvalue="npm.dev" />
<item itemvalue="npm.copyJs" />
<item itemvalue="npm.handleLotS" />
</list>
</recent_temporary>
</component>
......@@ -137,7 +141,7 @@
<workItem from="1612576979459" duration="13000" />
<workItem from="1612577003915" duration="21094000" />
<workItem from="1612662929222" duration="40609000" />
<workItem from="1613698993022" duration="4067000" />
<workItem from="1613698993022" duration="6983000" />
</task>
<task id="LOCAL-00001" summary="斐乐消消乐">
<created>1612581213298</created>
......@@ -251,7 +255,14 @@
<option name="project" value="LOCAL" />
<updated>1613703361421</updated>
</task>
<option name="localTasksCounter" value="17" />
<task id="LOCAL-00017" summary="m">
<created>1613703466149</created>
<option name="number" value="00017" />
<option name="presentableId" value="LOCAL-00017" />
<option name="project" value="LOCAL" />
<updated>1613703466149</updated>
</task>
<option name="localTasksCounter" value="18" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -147,6 +147,7 @@ export enum TbNetName {
* itemId
*/
openDetail = "mine.openDetail",
openTask = "mine.openTask",
/**
* 自定义埋点
* logkey
......
......@@ -15,8 +15,7 @@ import Ease = FYGE.Ease;
export class Tools {
public static openTask() {
console.error('TODO 打开任务');
alert('TODO 打开任务');
sendTbNet(TbNetName.openTask);
}
public static addSteps = 5;
......@@ -95,10 +94,11 @@ export class Tools {
*/
public static consumerTools(type: PropType): Promise<boolean> {
return new Promise((resolve, reject) => {
sendTbNet(TbNetName.consumerTools, { type }, (s, res) => {
sendTbNet(TbNetName.consumerTools, { type }, async (s, res) => {
if (s) {
//修改道具数量
this.gameData.tools = res.data.tools;
// this.gameData.tools = res.data.tools;
await Tools.updateTools();
resolve(true)
} else {
// reject()
......@@ -108,6 +108,21 @@ export class Tools {
})
}
public static updateTools() {
return new Promise((resolve, reject) => {
sendTbNet(TbNetName.getToolsInfo, {}, (s, res) => {
if (s) {
//修改道具数量
this.gameData.tools = res.data.tools;
resolve(true)
} else {
// reject()
resolve(false)
}
});
});
}
public static gameOver(data) {
if (data.level == Tools.maxLevel) { // 99肯定是抽奖机会
showPanel(SuccessNoPrizePanel, data);
......
......@@ -17,6 +17,13 @@ export class NoEnergyPanel extends Panel {
this.addChild(Tools.getSprite('体力不足.png')).position.set(171, 582);
this.okBtn = this.addChild(new Button(RES.getRes('体力不足按钮.png')));
this.okBtn.position.set(190, 830);
this.addChild(new Button(RES.getRes('关闭按钮.png')))
.addEventListener(MouseEvent.CLICK, () => {
this.hidePanel();
this.data.cancel();
}, this)
.position.set(640, 494);
}
start(data) {
......
......@@ -791,7 +791,7 @@ export class PlayScene extends Scene {
* 更新三个道具
* 绝对别修改,其他地方有调用的
*/
updateScene() {
async updateScene() {
this.propBtnCon.boomCount = Tools.gameData.tools.booms;
this.propBtnCon.hammerCount = Tools.gameData.tools.hammers;
this.propBtnCon.stepCount = Tools.gameData.tools.steps;
......
......@@ -61,8 +61,6 @@ export default class MapUI extends Container {
break;
case this.clearanceBtn:
/// TODO 打开通关抽奖
// console.error("TODO 打开通关抽奖");
showPanel(LotteryPanel)
break;
}
......
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