Commit 2d7db2f9 authored by haiyoucuv's avatar haiyoucuv

Success Panel Effect!

parent bc4c2959
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="9cef0552-af3c-4a1c-be1f-dc41ebe5b6db" name="Default Changelist" comment=""> <list default="true" id="9cef0552-af3c-4a1c-be1f-dc41ebe5b6db" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/src/Tools.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/Tools.ts" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" 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" afterPath="$PROJECT_DIR$/src/panels/StartPanelPrize.ts" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
...@@ -117,7 +119,7 @@ ...@@ -117,7 +119,7 @@
<workItem from="1595555429502" duration="13854000" /> <workItem from="1595555429502" duration="13854000" />
<workItem from="1595815330125" duration="170000" /> <workItem from="1595815330125" duration="170000" />
<workItem from="1595815541868" duration="600000" /> <workItem from="1595815541868" duration="600000" />
<workItem from="1595820295687" duration="3708000" /> <workItem from="1595820295687" duration="4487000" />
</task> </task>
<task id="LOCAL-00001" summary="111"> <task id="LOCAL-00001" summary="111">
<created>1594122339119</created> <created>1594122339119</created>
...@@ -343,7 +345,14 @@ ...@@ -343,7 +345,14 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1595584298167</updated> <updated>1595584298167</updated>
</task> </task>
<option name="localTasksCounter" value="33" /> <task id="LOCAL-00033" summary="Success Panel Effect!">
<created>1595850578565</created>
<option name="number" value="00033" />
<option name="presentableId" value="LOCAL-00033" />
<option name="project" value="LOCAL" />
<updated>1595850578565</updated>
</task>
<option name="localTasksCounter" value="34" />
<servers /> <servers />
</component> </component>
<component name="TypeScriptGeneratedFilesManager"> <component name="TypeScriptGeneratedFilesManager">
...@@ -369,9 +378,10 @@ ...@@ -369,9 +378,10 @@
<screen x="31" y="23" width="1889" height="1177" /> <screen x="31" y="23" width="1889" height="1177" />
</state> </state>
<state x="251" y="471" key="ANALYSIS_DLG_com.intellij.analysis.BaseAnalysisAction$1/31.23.1889.1177@31.23.1889.1177" timestamp="1594113080922" /> <state x="251" y="471" key="ANALYSIS_DLG_com.intellij.analysis.BaseAnalysisAction$1/31.23.1889.1177@31.23.1889.1177" timestamp="1594113080922" />
<state x="558" y="183" width="884" height="891" key="CommitChangelistDialog2" timestamp="1595584297912"> <state x="557" y="183" width="884" height="891" key="CommitChangelistDialog2" timestamp="1595850578271">
<screen x="31" y="23" width="1889" height="1177" /> <screen x="30" y="23" width="1890" height="1177" />
</state> </state>
<state x="557" y="183" key="CommitChangelistDialog2/30.23.1890.1177@30.23.1890.1177" timestamp="1595850578271" />
<state x="558" y="183" width="884" height="891" key="CommitChangelistDialog2/31.23.1889.1177@31.23.1889.1177" timestamp="1595584297912" /> <state x="558" y="183" width="884" height="891" key="CommitChangelistDialog2/31.23.1889.1177@31.23.1889.1177" timestamp="1595584297912" />
<state width="883" height="321" key="GridCell.Tab.0.bottom" timestamp="1595849720127"> <state width="883" height="321" key="GridCell.Tab.0.bottom" timestamp="1595849720127">
<screen x="30" y="23" width="1890" height="1177" /> <screen x="30" y="23" width="1890" height="1177" />
...@@ -409,9 +419,10 @@ ...@@ -409,9 +419,10 @@
<screen x="31" y="23" width="1889" height="1177" /> <screen x="31" y="23" width="1889" height="1177" />
</state> </state>
<state x="300" y="248" key="SettingsEditor/31.23.1889.1177@31.23.1889.1177" timestamp="1594798992724" /> <state x="300" y="248" key="SettingsEditor/31.23.1889.1177@31.23.1889.1177" timestamp="1594798992724" />
<state x="92" y="351" key="Vcs.Push.Dialog.v2" timestamp="1595584299423"> <state x="91" y="351" key="Vcs.Push.Dialog.v2" timestamp="1595850579791">
<screen x="31" y="23" width="1889" height="1177" /> <screen x="30" y="23" width="1890" height="1177" />
</state> </state>
<state x="91" y="351" key="Vcs.Push.Dialog.v2/30.23.1890.1177@30.23.1890.1177" timestamp="1595850579791" />
<state x="92" y="351" key="Vcs.Push.Dialog.v2/31.23.1889.1177@31.23.1889.1177" timestamp="1595584299423" /> <state x="92" y="351" key="Vcs.Push.Dialog.v2/31.23.1889.1177@31.23.1889.1177" timestamp="1595584299423" />
<state x="87" y="216" key="com.intellij.openapi.editor.actions.MultiplePasteAction$ClipboardContentChooser" timestamp="1594705166397"> <state x="87" y="216" key="com.intellij.openapi.editor.actions.MultiplePasteAction$ClipboardContentChooser" timestamp="1594705166397">
<screen x="31" y="23" width="1889" height="1177" /> <screen x="31" y="23" width="1889" height="1177" />
...@@ -437,10 +448,10 @@ ...@@ -437,10 +448,10 @@
<screen x="31" y="23" width="1889" height="1177" /> <screen x="31" y="23" width="1889" height="1177" />
</state> </state>
<state x="157" y="286" key="run.anything.popup/31.23.1889.1177@31.23.1889.1177" timestamp="1595475548860" /> <state x="157" y="286" key="run.anything.popup/31.23.1889.1177@31.23.1889.1177" timestamp="1595475548860" />
<state x="639" y="288" width="671" height="676" key="search.everywhere.popup" timestamp="1595849266199"> <state x="639" y="288" width="671" height="676" key="search.everywhere.popup" timestamp="1595854750147">
<screen x="30" y="23" width="1890" height="1177" /> <screen x="30" y="23" width="1890" height="1177" />
</state> </state>
<state x="639" y="288" width="671" height="676" key="search.everywhere.popup/30.23.1890.1177@30.23.1890.1177" timestamp="1595849266199" /> <state x="639" y="288" width="671" height="676" key="search.everywhere.popup/30.23.1890.1177@30.23.1890.1177" timestamp="1595854750147" />
<state x="640" y="288" width="670" height="676" key="search.everywhere.popup/31.23.1889.1177@31.23.1889.1177" timestamp="1595584259535" /> <state x="640" y="288" width="670" height="676" key="search.everywhere.popup/31.23.1889.1177@31.23.1889.1177" timestamp="1595584259535" />
</component> </component>
</project> </project>
\ No newline at end of file
...@@ -32,8 +32,8 @@ export class StartPanel extends Panel { ...@@ -32,8 +32,8 @@ export class StartPanel extends Panel {
this.isShowing = true; this.isShowing = true;
this.anchor.set(375, 812); this.anchor.set(375, 812);
Tween.get(this) Tween.get(this)
.set({ scaleX: 0, scaleY: 0 }) .set({scaleX: 0, scaleY: 0})
.to({ scaleX: 1, scaleY: 1 }, 400, Ease.backOut) .to({scaleX: 1, scaleY: 1}, 400, Ease.backOut)
.call(() => { .call(() => {
this.isShowing = false; this.isShowing = false;
}); });
...@@ -60,15 +60,18 @@ export class StartPanel extends Panel { ...@@ -60,15 +60,18 @@ export class StartPanel extends Panel {
} }
private startGame() { private startGame() {
this.enableMouseEvt(false);
if (!this.data.isPlayed && Tools.gameData.power <= 0) {// 体力不足 if (!this.data.isPlayed && Tools.gameData.power <= 0) {// 体力不足
showPanel(NoEnergyPanel); showPanel(NoEnergyPanel);
this.enableMouseEvt(true);
return; return;
} }
sendTbNet(TbNetName.dojoin, { level: this.data.level }, sendTbNet(TbNetName.dojoin, {level: this.data.level},
(success, res) => { (success, res) => {
this.enableMouseEvt(true);
if (!success) return; if (!success) return;
Tools.gameData.power = res.data.power; Tools.gameData.power = res.data.power;
changeScene(PlayScene, { chapter: this.data.level }); changeScene(PlayScene, {chapter: this.data.level});
this.hidePanel(); this.hidePanel();
} }
); );
...@@ -136,7 +139,7 @@ export class StartTargetItem extends Container { ...@@ -136,7 +139,7 @@ export class StartTargetItem extends Container {
// 变大的动效 // 变大的动效
public playEffect() { public playEffect() {
Tween.get(this) Tween.get(this)
.set({ scaleX: 0, scaleY: 0 }) .set({scaleX: 0, scaleY: 0})
.to({ scaleX: 1, scaleY: 1 }, 500, Ease.backOut) .to({scaleX: 1, scaleY: 1}, 500, Ease.backOut)
} }
} }
...@@ -62,12 +62,15 @@ export class StartPanelPrize extends Panel { ...@@ -62,12 +62,15 @@ export class StartPanelPrize extends Panel {
} }
private startGame() { private startGame() {
this.enableMouseEvt(false);
if (!this.data.isPlayed && Tools.gameData.power <= 0) {// 体力不足 if (!this.data.isPlayed && Tools.gameData.power <= 0) {// 体力不足
showPanel(NoEnergyPanel); showPanel(NoEnergyPanel);
this.enableMouseEvt(true);
return; return;
} }
sendTbNet(TbNetName.dojoin, {level: this.data.level}, sendTbNet(TbNetName.dojoin, {level: this.data.level},
(success, res) => { (success, res) => {
this.enableMouseEvt(true);
if (!success) return; if (!success) return;
Tools.gameData.power = res.data.power; Tools.gameData.power = res.data.power;
changeScene(PlayScene, {chapter: this.data.level}); changeScene(PlayScene, {chapter: this.data.level});
......
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