Commit 3454b109 authored by 邱旭's avatar 邱旭

Rule

parent 2b1692e2
......@@ -2,14 +2,14 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="0d3cb18d-e144-41a0-bc8b-4877c2e1fef1" name="默认的" comment="">
<change afterPath="$PROJECT_DIR$/resource/RulePanel/ruleBtn.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/UseStep/useStepBg.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/UseStep/useStepCancel.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/UseStep/useStepOk.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/panels/UseStep.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resource/RulePanel/活动规则背景.png" beforeDir="false" afterPath="$PROJECT_DIR$/resource/RulePanel/活动规则背景.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resource/common/关闭按钮.png" beforeDir="false" afterPath="$PROJECT_DIR$/resource/common/关闭按钮.png" afterDir="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/panels/RulePanel.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/panels/RulePanel.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/scene/PlayScene.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/scene/PlayScene.ts" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
......@@ -43,13 +43,14 @@
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/resource" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/src/panels" />
<property name="nodejs_package_manager_path" value="npm" />
<property name="ts.external.directory.path" value="$PROJECT_DIR$/node_modules/typescript/lib" />
<property name="vue.rearranger.settings.migration" value="true" />
</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/src/panels" />
<recent name="$PROJECT_DIR$/resource" />
</key>
<key name="MoveFile.RECENT_KEYS">
......@@ -112,7 +113,7 @@
<option name="presentableId" value="Default" />
<updated>1612576978320</updated>
<workItem from="1612576979459" duration="13000" />
<workItem from="1612577003915" duration="14842000" />
<workItem from="1612577003915" duration="15938000" />
</task>
<task id="LOCAL-00001" summary="斐乐消消乐">
<created>1612581213298</created>
......@@ -135,7 +136,14 @@
<option name="project" value="LOCAL" />
<updated>1612597435229</updated>
</task>
<option name="localTasksCounter" value="4" />
<task id="LOCAL-00004" summary="Rule">
<created>1612598313143</created>
<option name="number" value="00004" />
<option name="presentableId" value="LOCAL-00004" />
<option name="project" value="LOCAL" />
<updated>1612598313143</updated>
</task>
<option name="localTasksCounter" value="5" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
......@@ -148,6 +156,7 @@
<MESSAGE value="斐乐消消乐" />
<MESSAGE value="gameGuide" />
<MESSAGE value="首页引导" />
<option name="LAST_COMMIT_MESSAGE" value="首页引导" />
<MESSAGE value="Rule" />
<option name="LAST_COMMIT_MESSAGE" value="Rule" />
</component>
</project>
\ No newline at end of file
......@@ -64,6 +64,10 @@
"keys": "道具不足背景.png",
"name": "ToolsOutPanel"
},
{
"keys": "useStepBg.png,useStepCancel.png,useStepOk.png",
"name": "UseStep"
},
{
"keys": "使用道具背景.png",
"name": "UseToolPanel"
......
......@@ -64,6 +64,10 @@ export const ResJson = {
"keys": "道具不足背景.png",
"name": "ToolsOutPanel"
},
{
"keys": "useStepBg.png,useStepCancel.png,useStepOk.png",
"name": "UseStep"
},
{
"keys": "使用道具背景.png",
"name": "UseToolPanel"
......
import {Panel} from "../../module/views/Panel";
import {Tools} from "../Tools";
import {RES} from "../../module/RES";
import Button = FYGE.Button;
import MouseEvent = FYGE.MouseEvent;
import TEXT_ALIGN = FYGE.TEXT_ALIGN;
export class UseStep extends Panel {
get groupNames() {
return ["UseStep"]
};
initUi() {
this.addChild(Tools.getSprite('useStepBg.png')).position.set(86, 512);
this.addChild(Tools.getText( /// TODO 道具加步数
`确定要使用步数道具+5步数吗?`, 33, '#744f1d',
TEXT_ALIGN.CENTER, 750, 0, 685
));
this.addChild(new Button(RES.getRes('useStepOk.png')))
.addEventListener(MouseEvent.CLICK, () => {
this.hidePanel();
this.data.ok();
}, this)
.position.set(392, 865);
this.addChild(new Button(RES.getRes('useStepCancel.png')))
.addEventListener(MouseEvent.CLICK, () => {
this.hidePanel();
this.data.cancel();
}, this)
.position.set(107, 865);
this.addChild(new Button(RES.getRes('关闭按钮.png')))
.addEventListener(MouseEvent.CLICK, () => {
this.hidePanel();
this.data.cancel();
}, this)
.position.set(640, 494);
}
}
......@@ -63,6 +63,7 @@ import { FirstPropGift } from '../something/uis/FirstPropGift';
import { bonus_lottie } from '../lotties/bonus_lottie';
import { GDispatcher } from '../Main';
import { G_EVENT } from '../common/G_EVENT';
import { UseStep } from "../panels/UseStep";
const aniClass = {
"BoomAni": BoomAni,
......@@ -888,6 +889,17 @@ export class PlayScene extends Scene {
this.isShowWarning = false;
this.resetWarning();
}
// 体力改成弹窗
if (prop == PropType.STEPS) {
showPanel(UseStep, {
cancel: () => this.addEventListener(FYGE.Event.ENTER_FRAME, this.onEnterFrame, this), //还原事件
ok: () => this.sendPropUse(PropType.STEPS)
});
return;
}
// 体力改成弹窗
//添加引导蒙层
this.addChild(this.propGuide);
this.propGuide.init(prop);
......
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