Commit fd82aa6b authored by haiyoucuv's avatar haiyoucuv

panels

parent 74afba80
...@@ -2,14 +2,14 @@ ...@@ -2,14 +2,14 @@
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="31be0130-d27d-4740-b668-956a8050e1bf" name="Default Changelist" comment=""> <list default="true" id="31be0130-d27d-4740-b668-956a8050e1bf" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/resource/shopPanel/shop_item_bg.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/shopPanel/shop_mask.png" afterDir="false" />
<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$/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/panels/ExRecordPanel.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/panels/ExRecordPanel.ts" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/panels/ExRecordPanel.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/panels/ExRecordPanel.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/panels/ExahangePanel.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/panels/ExchangePanel.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/panels/ShopPanel.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/panels/ShopPanel.ts" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/panels/ShopPanel.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/panels/ShopPanel.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/panels/TaskPanel.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/panels/TaskPanel.ts" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/panels/TaskPanel.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/panels/TaskPanel.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/panels/WareHousePanel.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/panels/WareHousePanel.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/parts/Game/Land.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/parts/Game/Land.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/parts/UI/UILayer.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/parts/UI/UILayer.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" />
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
<recent name="$PROJECT_DIR$/resource/exRecord" /> <recent name="$PROJECT_DIR$/resource/exRecord" />
</key> </key>
</component> </component>
<component name="RunManager" selected="npm.flushRes"> <component name="RunManager" selected="npm.dev">
<configuration name="dev" 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" /> <package-json value="$PROJECT_DIR$/package.json" />
<command value="run" /> <command value="run" />
...@@ -92,9 +92,9 @@ ...@@ -92,9 +92,9 @@
</configuration> </configuration>
<recent_temporary> <recent_temporary>
<list> <list>
<item itemvalue="npm.dev" />
<item itemvalue="npm.flushRes" /> <item itemvalue="npm.flushRes" />
<item itemvalue="npm.handleRes" /> <item itemvalue="npm.handleRes" />
<item itemvalue="npm.dev" />
</list> </list>
</recent_temporary> </recent_temporary>
</component> </component>
...@@ -116,7 +116,9 @@ ...@@ -116,7 +116,9 @@
<workItem from="1591166639510" duration="12991000" /> <workItem from="1591166639510" duration="12991000" />
<workItem from="1591234777751" duration="4647000" /> <workItem from="1591234777751" duration="4647000" />
<workItem from="1591239841506" duration="24292000" /> <workItem from="1591239841506" duration="24292000" />
<workItem from="1591321317628" duration="15842000" /> <workItem from="1591321317628" duration="18063000" />
<workItem from="1591438071338" duration="597000" />
<workItem from="1591581198126" duration="2458000" />
</task> </task>
<task id="LOCAL-00001" summary="1"> <task id="LOCAL-00001" summary="1">
<created>1591003912929</created> <created>1591003912929</created>
...@@ -195,7 +197,14 @@ ...@@ -195,7 +197,14 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1591341219331</updated> <updated>1591341219331</updated>
</task> </task>
<option name="localTasksCounter" value="12" /> <task id="LOCAL-00012" summary="shop panel">
<created>1591346651129</created>
<option name="number" value="00012" />
<option name="presentableId" value="LOCAL-00012" />
<option name="project" value="LOCAL" />
<updated>1591346651129</updated>
</task>
<option name="localTasksCounter" value="13" />
<servers /> <servers />
</component> </component>
<component name="TypeScriptGeneratedFilesManager"> <component name="TypeScriptGeneratedFilesManager">
...@@ -207,43 +216,44 @@ ...@@ -207,43 +216,44 @@
<MESSAGE value="111" /> <MESSAGE value="111" />
<MESSAGE value="task" /> <MESSAGE value="task" />
<MESSAGE value="panel" /> <MESSAGE value="panel" />
<option name="LAST_COMMIT_MESSAGE" value="panel" /> <MESSAGE value="shop panel" />
<option name="LAST_COMMIT_MESSAGE" value="shop panel" />
</component> </component>
<component name="WindowStateProjectService"> <component name="WindowStateProjectService">
<state x="671" y="259" key="#com.intellij.ide.util.MemberChooser" timestamp="1591344864454"> <state x="671" y="259" key="#com.intellij.ide.util.MemberChooser" timestamp="1591344864454">
<screen x="37" y="23" width="1643" height="1027" /> <screen x="37" y="23" width="1643" height="1027" />
</state> </state>
<state x="671" y="259" key="#com.intellij.ide.util.MemberChooser/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591344864454" /> <state x="671" y="259" key="#com.intellij.ide.util.MemberChooser/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591344864454" />
<state x="467" y="108" key="CommitChangelistDialog2" timestamp="1591341218930"> <state x="467" y="108" key="CommitChangelistDialog2" timestamp="1591346650647">
<screen x="37" y="23" width="1643" height="1027" /> <screen x="37" y="23" width="1643" height="1027" />
</state> </state>
<state x="466" y="108" key="CommitChangelistDialog2/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027" timestamp="1591003912498" /> <state x="466" y="108" key="CommitChangelistDialog2/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027" timestamp="1591003912498" />
<state x="2182" y="-102" key="CommitChangelistDialog2/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591189619717" /> <state x="2182" y="-102" key="CommitChangelistDialog2/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591189619717" />
<state x="467" y="108" key="CommitChangelistDialog2/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591341218930" /> <state x="467" y="108" key="CommitChangelistDialog2/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591346650647" />
<state width="293" height="907" key="GridCell.Tab.0.bottom" timestamp="1591345482325"> <state width="1601" height="346" key="GridCell.Tab.0.bottom" timestamp="1591353787138">
<screen x="37" y="23" width="1643" height="1027" /> <screen x="37" y="23" width="1643" height="1027" />
</state> </state>
<state width="499" height="907" key="GridCell.Tab.0.bottom/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027" timestamp="1591065953118" /> <state width="499" height="907" key="GridCell.Tab.0.bottom/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027" timestamp="1591065953118" />
<state width="257" height="1057" key="GridCell.Tab.0.bottom/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591189627828" /> <state width="257" height="1057" key="GridCell.Tab.0.bottom/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591189627828" />
<state width="293" height="907" key="GridCell.Tab.0.bottom/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591345482325" /> <state width="1601" height="346" key="GridCell.Tab.0.bottom/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591353787138" />
<state width="293" height="907" key="GridCell.Tab.0.center" timestamp="1591345482324"> <state width="1601" height="346" key="GridCell.Tab.0.center" timestamp="1591353787137">
<screen x="37" y="23" width="1643" height="1027" /> <screen x="37" y="23" width="1643" height="1027" />
</state> </state>
<state width="499" height="907" key="GridCell.Tab.0.center/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027" timestamp="1591065953116" /> <state width="499" height="907" key="GridCell.Tab.0.center/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027" timestamp="1591065953116" />
<state width="257" height="1057" key="GridCell.Tab.0.center/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591189627827" /> <state width="257" height="1057" key="GridCell.Tab.0.center/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591189627827" />
<state width="293" height="907" key="GridCell.Tab.0.center/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591345482324" /> <state width="1601" height="346" key="GridCell.Tab.0.center/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591353787137" />
<state width="293" height="907" key="GridCell.Tab.0.left" timestamp="1591345482322"> <state width="1601" height="346" key="GridCell.Tab.0.left" timestamp="1591353787137">
<screen x="37" y="23" width="1643" height="1027" /> <screen x="37" y="23" width="1643" height="1027" />
</state> </state>
<state width="499" height="907" key="GridCell.Tab.0.left/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027" timestamp="1591065953114" /> <state width="499" height="907" key="GridCell.Tab.0.left/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027" timestamp="1591065953114" />
<state width="257" height="1057" key="GridCell.Tab.0.left/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591189627825" /> <state width="257" height="1057" key="GridCell.Tab.0.left/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591189627825" />
<state width="293" height="907" key="GridCell.Tab.0.left/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591345482322" /> <state width="1601" height="346" key="GridCell.Tab.0.left/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591353787137" />
<state width="293" height="907" key="GridCell.Tab.0.right" timestamp="1591345482325"> <state width="1601" height="346" key="GridCell.Tab.0.right" timestamp="1591353787138">
<screen x="37" y="23" width="1643" height="1027" /> <screen x="37" y="23" width="1643" height="1027" />
</state> </state>
<state width="499" height="907" key="GridCell.Tab.0.right/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027" timestamp="1591065953118" /> <state width="499" height="907" key="GridCell.Tab.0.right/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027" timestamp="1591065953118" />
<state width="257" height="1057" key="GridCell.Tab.0.right/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591189627828" /> <state width="257" height="1057" key="GridCell.Tab.0.right/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591189627828" />
<state width="293" height="907" key="GridCell.Tab.0.right/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591345482325" /> <state width="1601" height="346" key="GridCell.Tab.0.right/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591353787138" />
<state x="446" y="278" key="IDE.errors.dialog" timestamp="1591150813027"> <state x="446" y="278" key="IDE.errors.dialog" timestamp="1591150813027">
<screen x="37" y="23" width="1643" height="1027" /> <screen x="37" y="23" width="1643" height="1027" />
</state> </state>
...@@ -253,11 +263,11 @@ ...@@ -253,11 +263,11 @@
</state> </state>
<state x="614" y="245" key="RollbackChangesDialog/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027" timestamp="1590993046653" /> <state x="614" y="245" key="RollbackChangesDialog/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027" timestamp="1590993046653" />
<state x="615" y="245" key="RollbackChangesDialog/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591077661188" /> <state x="615" y="245" key="RollbackChangesDialog/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591077661188" />
<state x="457" y="276" key="Vcs.Push.Dialog.v2" timestamp="1591341221093"> <state x="457" y="276" key="Vcs.Push.Dialog.v2" timestamp="1591346652850">
<screen x="37" y="23" width="1643" height="1027" /> <screen x="37" y="23" width="1643" height="1027" />
</state> </state>
<state x="2171" y="91" key="Vcs.Push.Dialog.v2/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591189622538" /> <state x="2171" y="91" key="Vcs.Push.Dialog.v2/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591189622538" />
<state x="457" y="276" key="Vcs.Push.Dialog.v2/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591341221093" /> <state x="457" y="276" key="Vcs.Push.Dialog.v2/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591346652850" />
<state x="417" y="141" key="com.intellij.openapi.editor.actions.MultiplePasteAction$ClipboardContentChooser" timestamp="1591269112575"> <state x="417" y="141" key="com.intellij.openapi.editor.actions.MultiplePasteAction$ClipboardContentChooser" timestamp="1591269112575">
<screen x="37" y="23" width="1643" height="1027" /> <screen x="37" y="23" width="1643" height="1027" />
</state> </state>
...@@ -270,11 +280,11 @@ ...@@ -270,11 +280,11 @@
<screen x="35" y="23" width="1645" height="1027" /> <screen x="35" y="23" width="1645" height="1027" />
</state> </state>
<state x="586" y="314" key="refactoring.ChangeSignatureDialog/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027" timestamp="1590980819551" /> <state x="586" y="314" key="refactoring.ChangeSignatureDialog/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027" timestamp="1590980819551" />
<state x="523" y="250" width="670" height="676" key="search.everywhere.popup" timestamp="1591345104113"> <state x="2248" y="61" width="783" height="775" key="search.everywhere.popup" timestamp="1591582557074">
<screen x="37" y="23" width="1643" height="1027" /> <screen x="1680" y="-199" width="1920" height="1177" />
</state> </state>
<state x="522" y="250" width="670" height="676" key="search.everywhere.popup/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027" timestamp="1591066027960" /> <state x="522" y="250" width="670" height="676" key="search.everywhere.popup/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027" timestamp="1591066027960" />
<state x="2248" y="61" width="783" height="775" key="search.everywhere.popup/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591271608415" /> <state x="2248" y="61" width="783" height="775" key="search.everywhere.popup/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591582557074" />
<state x="523" y="250" width="670" height="676" key="search.everywhere.popup/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591345104113" /> <state x="523" y="250" width="670" height="676" key="search.everywhere.popup/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591582542704" />
</component> </component>
</project> </project>
\ No newline at end of file
...@@ -6,6 +6,10 @@ import Tween = FYGE.Tween; ...@@ -6,6 +6,10 @@ import Tween = FYGE.Tween;
import ScrollList = FYGE.ScrollList; import ScrollList = FYGE.ScrollList;
import Container = FYGE.Container; import Container = FYGE.Container;
import IScrollListItem = FYGE.IScrollListItem; import IScrollListItem = FYGE.IScrollListItem;
import Texture = FYGE.Texture;
import Graphics = FYGE.Graphics;
import TextField = FYGE.TextField;
import { Ease } from "fyge";
export default class ExRecordPanel extends Panel { export default class ExRecordPanel extends Panel {
get groupNames() { get groupNames() {
...@@ -29,7 +33,32 @@ export default class ExRecordPanel extends Panel { ...@@ -29,7 +33,32 @@ export default class ExRecordPanel extends Panel {
this.scroll.position.set((this.width - this.scroll.width) / 2, 210); this.scroll.position.set((this.width - this.scroll.width) / 2, 210);
this.scroll.updateData([ this.scroll.updateData([
1, 2, 3, 4, 5, 6 {
prizeImg: 'https://source.unsplash.com/user/erondu/116x116',
prizeName: '恰恰10元抵扣卷',
prizeDate: '1010.01.01',
},
{
prizeImg: 'https://source.unsplash.com/user/erondu/116x116',
prizeName: '恰恰20元抵扣卷',
prizeDate: '2020.02.02',
},
{
prizeImg: 'https://source.unsplash.com/user/erondu/116x116',
prizeName: '恰恰30元抵扣卷',
prizeDate: '3030.03.03',
},
{
prizeImg: 'https://source.unsplash.com/user/erondu/116x116',
prizeName: '恰恰40元抵扣卷',
prizeDate: '4040.04.04',
},
{
prizeImg: 'https://source.unsplash.com/user/erondu/116x116',
prizeName: '恰恰50元抵扣卷',
prizeDate: '5050.05.05',
},
]); ]);
...@@ -39,9 +68,9 @@ export default class ExRecordPanel extends Panel { ...@@ -39,9 +68,9 @@ export default class ExRecordPanel extends Panel {
if (this.isShowing) return; if (this.isShowing) return;
this.isShowing = true; this.isShowing = true;
this.y = this.height; this.y = this.height;
const _y = layers.height - this.height + 30; const _y = 1624 - this.height - layers.stageOffsetY + 50 + 50;
Tween.get(this) Tween.get(this)
.to({y: _y}, 500, FYGE.Ease.quartOut) .to({y: _y}, 500, Ease.quartOut)
.call(() => { .call(() => {
this.isShowing = false; this.isShowing = false;
}); });
...@@ -65,8 +94,15 @@ class RecordItem extends Container implements IScrollListItem { ...@@ -65,8 +94,15 @@ class RecordItem extends Container implements IScrollListItem {
public data: number; public data: number;
public id: number; public id: number;
private prizeImg: Sprite;
private prizeName: TextField;
private prizeDate: TextField;
public initData(id: number, data: any): void { public initData(id: number, data: any): void {
if (!data) return; if (!data) return;
this.prizeImg.texture = Texture.fromUrl(data.prizeImg);
this.prizeName.text = data.prizeName;
this.prizeDate.text = `${data.prizeDate}兑换`;
} }
constructor() { constructor() {
...@@ -74,6 +110,20 @@ class RecordItem extends Container implements IScrollListItem { ...@@ -74,6 +110,20 @@ class RecordItem extends Container implements IScrollListItem {
this.addChild(Tool.getSprite('record_item_bg.png')); this.addChild(Tool.getSprite('record_item_bg.png'));
this.prizeImg = this.addChild(new Sprite());
this.prizeImg.position.set(34, 25);
const mask = this.addChild(new Graphics());
mask.drawCircle(92, 83, 58);
this.prizeImg.mask = mask;
this.prizeName = this.addChild(Tool.getText('', 26, '#4a4a4a'));
this.prizeName.position.set(176, 50);
this.prizeDate = this.addChild(Tool.getText('', 22, '#999999'));
this.prizeDate.position.set(176, 91);
} }
} }
...@@ -2,7 +2,7 @@ import { Panel } from "../../module/views/Panel"; ...@@ -2,7 +2,7 @@ import { Panel } from "../../module/views/Panel";
import { Tool } from "../Tools"; import { Tool } from "../Tools";
import Sprite = FYGE.Sprite; import Sprite = FYGE.Sprite;
export class ExahangePanel extends Panel { export class ExchangePanel extends Panel {
get groupNames() { get groupNames() {
return ["exchangePanel"]; return ["exchangePanel"];
} }
......
...@@ -9,6 +9,7 @@ import ScrollList = FYGE.ScrollList; ...@@ -9,6 +9,7 @@ import ScrollList = FYGE.ScrollList;
import Texture = FYGE.Texture; import Texture = FYGE.Texture;
import Graphics = FYGE.Graphics; import Graphics = FYGE.Graphics;
import TextField = FYGE.TextField; import TextField = FYGE.TextField;
import { Ease } from "fyge";
export default class ShopPanel extends Panel { export default class ShopPanel extends Panel {
get groupNames() { get groupNames() {
...@@ -40,9 +41,9 @@ export default class ShopPanel extends Panel { ...@@ -40,9 +41,9 @@ export default class ShopPanel extends Panel {
if (this.isShowing) return; if (this.isShowing) return;
this.isShowing = true; this.isShowing = true;
this.y = this.height; this.y = this.height;
const _y = layers.height - this.height + 30; const _y = 1624 - this.height - layers.stageOffsetY + 50 + 50;
Tween.get(this) Tween.get(this)
.to({y: _y}, 500, FYGE.Ease.quartOut) .to({y: _y}, 500, Ease.quartOut)
.call(() => { .call(() => {
this.isShowing = false; this.isShowing = false;
}); });
...@@ -82,7 +83,7 @@ class ShopItem extends Container implements IScrollListItem { ...@@ -82,7 +83,7 @@ class ShopItem extends Container implements IScrollListItem {
this.itemImg = this.addChild(new Sprite()); this.itemImg = this.addChild(new Sprite());
this.itemImg.position.set(35, 26); this.itemImg.position.set(35, 26);
this.itemImg.texture = Texture.fromUrl('https://source.unsplash.com/collection/collectionid/116x116'); this.itemImg.texture = Texture.fromUrl('https://source.unsplash.com/user/erondu/116x116');
const mask = this.addChild(new Graphics()); const mask = this.addChild(new Graphics());
mask.drawCircle(92, 83, 58); mask.drawCircle(92, 83, 58);
......
...@@ -9,6 +9,7 @@ import Tween = FYGE.Tween; ...@@ -9,6 +9,7 @@ import Tween = FYGE.Tween;
import TextField = FYGE.TextField; import TextField = FYGE.TextField;
import { RES } from "../../module/RES"; import { RES } from "../../module/RES";
import MouseEvent = FYGE.MouseEvent; import MouseEvent = FYGE.MouseEvent;
import { Ease } from "fyge";
export default class TaskPanel extends Panel { export default class TaskPanel extends Panel {
get groupNames() { get groupNames() {
...@@ -81,9 +82,9 @@ export default class TaskPanel extends Panel { ...@@ -81,9 +82,9 @@ export default class TaskPanel extends Panel {
if (this.isShowing) return; if (this.isShowing) return;
this.isShowing = true; this.isShowing = true;
this.y = this.height; this.y = this.height;
const _y = layers.height - this.height + 30; const _y = 1624 - this.height - layers.stageOffsetY + 50 + 50;
Tween.get(this) Tween.get(this)
.to({y: _y}, 500, FYGE.Ease.quartOut) .to({y: _y}, 500, Ease.quartOut)
.call(() => { .call(() => {
this.isShowing = false; this.isShowing = false;
}); });
......
...@@ -27,7 +27,7 @@ export default class WareHousePanel extends Panel { ...@@ -27,7 +27,7 @@ export default class WareHousePanel extends Panel {
if (this.isShowing) return; if (this.isShowing) return;
this.isShowing = true; this.isShowing = true;
this.y = this.height; this.y = this.height;
const _y = layers.height - this.height + 30; const _y = 1624 - this.height - layers.stageOffsetY + 50 + 50;
Tween.get(this) Tween.get(this)
.to({y: _y}, 500, Ease.quartOut) .to({y: _y}, 500, Ease.quartOut)
.call(() => { .call(() => {
......
...@@ -148,15 +148,17 @@ export class Land extends Container { ...@@ -148,15 +148,17 @@ export class Land extends Container {
/** /**
* 浇水 * 浇水
*/ */
public water() { public water(e) {
console.log("浇水"); console.log("浇水");
e.stopPropagation();
} }
/** /**
* 收获 * 收获
*/ */
public get() { public get(e:MouseEvent) {
console.log("收获"); console.log("收获");
e.stopPropagation();
} }
/** /**
...@@ -187,7 +189,7 @@ export class Land extends Container { ...@@ -187,7 +189,7 @@ export class Land extends Container {
} }
} }
private clickThis() { private clickThis(e) {
console.log(`点到了土地: ${this.id}, state: ${this.state}`); console.log(`点到了土地: ${this.id}, state: ${this.state}`);
if (this.state == LAND_STATE.PLANT) { if (this.state == LAND_STATE.PLANT) {
this.progressBar.show(); this.progressBar.show();
...@@ -202,12 +204,12 @@ export class Land extends Container { ...@@ -202,12 +204,12 @@ export class Land extends Container {
*/ */
private addEvent() { private addEvent() {
// 加个监听 // 加个监听
this.addEventListener(MouseEvent.CLICK, this.clickThis, this); this.addEventListener(MouseEvent.CLICK, this.clickThis, this, false);
this.progressBar.addEventListener('endTime', this.endTime, this); this.progressBar.addEventListener('endTime', this.endTime, this);
} }
private removeEvent() { private removeEvent() {
this.removeEventListener(MouseEvent.CLICK, this.clickThis, this); this.removeEventListener(MouseEvent.CLICK, this.clickThis, this, false);
this.progressBar.removeEventListener('endTime', this.endTime, this); this.progressBar.removeEventListener('endTime', this.endTime, this);
} }
...@@ -244,9 +246,9 @@ export class Land extends Container { ...@@ -244,9 +246,9 @@ export class Land extends Container {
this.removeOption(); this.removeOption();
this.option = this.addChild(OptionPool.ins.takeOut(type)); this.option = this.addChild(OptionPool.ins.takeOut(type));
if (type == OPTION_TYPE.WATER) { if (type == OPTION_TYPE.WATER) {
this.option.addEventListener(MouseEvent.CLICK, this.water, this); this.option.addEventListener(MouseEvent.CLICK, this.water, this, false);
} else if (type == OPTION_TYPE.GET) { } else if (type == OPTION_TYPE.GET) {
this.option.addEventListener(MouseEvent.CLICK, this.get, this); this.option.addEventListener(MouseEvent.CLICK, this.get, this, false);
} }
this.option.x = 160; this.option.x = 160;
this.option.y = -50; this.option.y = -50;
......
...@@ -94,7 +94,7 @@ export class UILayer extends Container { ...@@ -94,7 +94,7 @@ export class UILayer extends Container {
// 顶部 // 顶部
let topGroup = this.addChild(new Container()); let topGroup = this.addChild(new Container());
this.userInfoGroup = topGroup.addChild(new UserInfoGroup({ this.userInfoGroup = topGroup.addChild(new UserInfoGroup({
avatar: 'https://source.unsplash.com/collection/collectionid/100x100', avatar: 'https://source.unsplash.com/user/erondu/100x100',
nickName: '哈哈哈哈', nickName: '哈哈哈哈',
waterNum: '666' waterNum: '666'
})); }));
......
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