Commit 92b1c8cf authored by haiyoucuv's avatar haiyoucuv

map effect

parent f8c6e81f
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
<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$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/scene/map/MapBottom.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/scene/map/MapBottom.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/scene/map/MapMid.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/scene/map/MapMid.ts" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/scene/map/MapMid.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/scene/map/MapMid.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> </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" />
...@@ -101,7 +103,7 @@ ...@@ -101,7 +103,7 @@
<workItem from="1594111755267" duration="29551000" /> <workItem from="1594111755267" duration="29551000" />
<workItem from="1594260676967" duration="30060000" /> <workItem from="1594260676967" duration="30060000" />
<workItem from="1594604662575" duration="27200000" /> <workItem from="1594604662575" duration="27200000" />
<workItem from="1594691193000" duration="4947000" /> <workItem from="1594691193000" duration="5801000" />
</task> </task>
<task id="LOCAL-00001" summary="111"> <task id="LOCAL-00001" summary="111">
<created>1594122339119</created> <created>1594122339119</created>
...@@ -159,7 +161,14 @@ ...@@ -159,7 +161,14 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1594695870103</updated> <updated>1594695870103</updated>
</task> </task>
<option name="localTasksCounter" value="9" /> <task id="LOCAL-00009" summary="map effect">
<created>1594696152026</created>
<option name="number" value="00009" />
<option name="presentableId" value="LOCAL-00009" />
<option name="project" value="LOCAL" />
<updated>1594696152026</updated>
</task>
<option name="localTasksCounter" value="10" />
<servers /> <servers />
</component> </component>
<component name="TypeScriptGeneratedFilesManager"> <component name="TypeScriptGeneratedFilesManager">
...@@ -183,10 +192,10 @@ ...@@ -183,10 +192,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="754" y="183" key="CommitChangelistDialog2" timestamp="1594695869890"> <state x="754" y="183" key="CommitChangelistDialog2" timestamp="1594696151860">
<screen x="31" y="23" width="1889" height="1177" /> <screen x="31" y="23" width="1889" height="1177" />
</state> </state>
<state x="754" y="183" key="CommitChangelistDialog2/31.23.1889.1177@31.23.1889.1177" timestamp="1594695869890" /> <state x="754" y="183" key="CommitChangelistDialog2/31.23.1889.1177@31.23.1889.1177" timestamp="1594696151860" />
<state width="882" height="329" key="GridCell.Tab.0.bottom" timestamp="1594693733806"> <state width="882" height="329" key="GridCell.Tab.0.bottom" timestamp="1594693733806">
<screen x="31" y="23" width="1889" height="1177" /> <screen x="31" y="23" width="1889" height="1177" />
</state> </state>
...@@ -211,10 +220,10 @@ ...@@ -211,10 +220,10 @@
<screen x="31" y="23" width="1889" height="1177" /> <screen x="31" y="23" width="1889" height="1177" />
</state> </state>
<state x="31" y="250" key="SettingsEditor/31.23.1889.1177@31.23.1889.1177" timestamp="1594195630991" /> <state x="31" y="250" key="SettingsEditor/31.23.1889.1177@31.23.1889.1177" timestamp="1594195630991" />
<state x="92" y="351" key="Vcs.Push.Dialog.v2" timestamp="1594695871725"> <state x="92" y="351" key="Vcs.Push.Dialog.v2" timestamp="1594696153043">
<screen x="31" y="23" width="1889" height="1177" /> <screen x="31" y="23" width="1889" height="1177" />
</state> </state>
<state x="92" y="351" key="Vcs.Push.Dialog.v2/31.23.1889.1177@31.23.1889.1177" timestamp="1594695871725" /> <state x="92" y="351" key="Vcs.Push.Dialog.v2/31.23.1889.1177@31.23.1889.1177" timestamp="1594696153043" />
<state x="87" y="216" key="com.intellij.openapi.editor.actions.MultiplePasteAction$ClipboardContentChooser" timestamp="1594111906161"> <state x="87" y="216" key="com.intellij.openapi.editor.actions.MultiplePasteAction$ClipboardContentChooser" timestamp="1594111906161">
<screen x="31" y="23" width="1889" height="1177" /> <screen x="31" y="23" width="1889" height="1177" />
</state> </state>
...@@ -239,9 +248,9 @@ ...@@ -239,9 +248,9 @@
<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="1594188122355" /> <state x="157" y="286" key="run.anything.popup/31.23.1889.1177@31.23.1889.1177" timestamp="1594188122355" />
<state x="640" y="288" width="670" height="676" key="search.everywhere.popup" timestamp="1594696135124"> <state x="640" y="288" width="670" height="676" key="search.everywhere.popup" timestamp="1594696970390">
<screen x="31" y="23" width="1889" height="1177" /> <screen x="31" y="23" width="1889" height="1177" />
</state> </state>
<state x="640" y="288" width="670" height="676" key="search.everywhere.popup/31.23.1889.1177@31.23.1889.1177" timestamp="1594696135124" /> <state x="640" y="288" width="670" height="676" key="search.everywhere.popup/31.23.1889.1177@31.23.1889.1177" timestamp="1594696970390" />
</component> </component>
</project> </project>
\ No newline at end of file
import { Panel } from "../../module/views/Panel";
export class BuyPowerPanel extends Panel {
get groupNames() {
return ["BuyPowerPanel"]
}
get skinName() {
return "BuyPowerPanel"
}
msgTxt: FYGE.TextField;
exchangeBtn: FYGE.Button;
closeBtn: FYGE.Button;
initUi() {
}
start(data) {
super.start();
}
initEvents() {
super.initEvents();
}
removeEvents() {
super.removeEvents();
}
}
...@@ -33,6 +33,7 @@ export default class MapBottom extends MapPart { ...@@ -33,6 +33,7 @@ export default class MapBottom extends MapPart {
} }
private initEffect() { private initEffect() {
// 螃蟹
const crabTextures: Texture[] = new Array(31); const crabTextures: Texture[] = new Array(31);
for (let i = 0; i < 16; i++) { for (let i = 0; i < 16; i++) {
crabTextures[31 - i] = crabTextures[i] = RES.getRes(`map_crab_${i}.png`); crabTextures[31 - i] = crabTextures[i] = RES.getRes(`map_crab_${i}.png`);
......
...@@ -38,26 +38,28 @@ export default class MapMid extends MapPart { ...@@ -38,26 +38,28 @@ export default class MapMid extends MapPart {
this.data = data; this.data = data;
this.bg.texture = RES.getRes('map_bg2.jpg'); this.bg.texture = RES.getRes('map_bg2.jpg');
this.initIcon();
this.initEffect();
// 流水
this.water1 = RES.getRes('water1.png'); this.water1 = RES.getRes('water1.png');
this.water2 = RES.getRes('water2.png'); this.water2 = RES.getRes('water2.png');
this.water = this.addChild(new Sprite(this.water1));
this.water.position.set(544, 687);
this.initIcon();
this.initEffect();
} }
private initEffect() { private initEffect() {
// 热气球
this.balloon = this.addChild(Tools.getSprite('map_狐狸气球.png', -216, 750)); this.balloon = this.addChild(Tools.getSprite('map_狐狸气球.png', -216, 750));
Tween.get(this.balloon, {loop: true}) Tween.get(this.balloon, {loop: true})
.set({x: -216, y: 1150}) .set({x: -216, y: 1150})
.to({x: 750 + 100, y: 837}, 20006); .to({x: 750 + 100, y: 837}, 20006);
this.balloon.mouseEnable = this.balloon.mouseChildren = false; this.balloon.mouseEnable = this.balloon.mouseChildren = false;
// 流水
this.water = this.addChild(new Sprite(this.water1)); this.water = this.addChild(new Sprite(this.water1));
this.water.position.set(544, 687); this.water.position.set(544, 687);
// 鲸鱼
const whaleTextures: Texture[] = new Array(25); const whaleTextures: Texture[] = new Array(25);
for (let i = 0; i < 13; i++) { for (let i = 0; i < 13; i++) {
whaleTextures[25 - i] = whaleTextures[i] = RES.getRes(`map_whale_${i}.png`); whaleTextures[25 - i] = whaleTextures[i] = RES.getRes(`map_whale_${i}.png`);
...@@ -66,6 +68,7 @@ export default class MapMid extends MapPart { ...@@ -66,6 +68,7 @@ export default class MapMid extends MapPart {
this.whaleAni.position.set(645, 575); this.whaleAni.position.set(645, 575);
this.whaleAni.play(-1); this.whaleAni.play(-1);
// 猫头鹰
const owlTextures: Texture[] = new Array(31); const owlTextures: Texture[] = new Array(31);
for (let i = 0; i < 16; i++) { for (let i = 0; i < 16; i++) {
owlTextures[31 - i] = owlTextures[i] = RES.getRes(`map_owl_${i}.png`); owlTextures[31 - i] = owlTextures[i] = RES.getRes(`map_owl_${i}.png`);
...@@ -91,6 +94,7 @@ export default class MapMid extends MapPart { ...@@ -91,6 +94,7 @@ export default class MapMid extends MapPart {
|| this.stage.viewRect.isPointIn(ucp) || this.stage.viewRect.isPointIn(ucp)
|| this.stage.viewRect.isPointIn(bcp); || this.stage.viewRect.isPointIn(bcp);
// 流水动画
if (this.waterIndex++ > 6) { if (this.waterIndex++ > 6) {
this.waterIndex1 = !this.waterIndex1; this.waterIndex1 = !this.waterIndex1;
this.water.texture = this.waterIndex1 ? this.water1 : this.water2; this.water.texture = this.waterIndex1 ? this.water1 : this.water2;
......
...@@ -8,6 +8,7 @@ import { Tools } from "../../Tools"; ...@@ -8,6 +8,7 @@ import { Tools } from "../../Tools";
import MouseEvent = FYGE.MouseEvent; import MouseEvent = FYGE.MouseEvent;
import { showPanel } from "../../../module/ctrls"; import { showPanel } from "../../../module/ctrls";
import { RulePanel } from "../../panels/RulePanel"; import { RulePanel } from "../../panels/RulePanel";
import { BuyPowerPanel } from "../../panels/BuyPowerPanel";
export default class MapUI extends Container { export default class MapUI extends Container {
public energyBox: EnergyBox = null; public energyBox: EnergyBox = null;
...@@ -110,6 +111,7 @@ class EnergyBox extends Container { ...@@ -110,6 +111,7 @@ class EnergyBox extends Container {
private clickAdd() { private clickAdd() {
/// TODO 增加按钮 /// TODO 增加按钮
console.log('增加按钮'); console.log('增加按钮');
showPanel(BuyPowerPanel);
} }
private initUi(data) { private initUi(data) {
......
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