Commit cd28d80c authored by haiyoucuv's avatar haiyoucuv

wareHouse

parent fd82aa6b
......@@ -2,14 +2,25 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="31be0130-d27d-4740-b668-956a8050e1bf" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/resource/wareHouse/wareHouse_item_bg.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/wareHouse/wareHouse_山核桃.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/wareHouse/wareHouse_开心果.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/wareHouse/wareHouse_板栗.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/wareHouse/wareHouse_瓜子.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/wareHouse/wareHouse_腰果.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/wareHouse/wareHouse_花生.png" 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/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$/released/resource/res.json" beforeDir="false" afterPath="$PROJECT_DIR$/released/resource/res.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/released/resource/shopPanel/shopPanel.json" beforeDir="false" afterPath="$PROJECT_DIR$/released/resource/shopPanel/shopPanel.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/released/resource/shopPanel/shopPanel.png" beforeDir="false" afterPath="$PROJECT_DIR$/released/resource/shopPanel/shopPanel.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/released/resource/taskPanel/taskPanel.json" beforeDir="false" afterPath="$PROJECT_DIR$/released/resource/taskPanel/taskPanel.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/released/resource/taskPanel/taskPanel.png" beforeDir="false" afterPath="$PROJECT_DIR$/released/resource/taskPanel/taskPanel.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/released/resource/wareHouse/wareHouse.json" beforeDir="false" afterPath="$PROJECT_DIR$/released/resource/wareHouse/wareHouse.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/released/resource/wareHouse/wareHouse.png" beforeDir="false" afterPath="$PROJECT_DIR$/released/resource/wareHouse/wareHouse.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/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>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
......@@ -36,7 +47,7 @@
<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/shopPanel" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/resource/wareHouse" />
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
<property name="nodejs_npm_path_reset_for_default_project" value="true" />
<property name="nodejs_package_manager_path" value="npm" />
......@@ -44,13 +55,6 @@
<property name="ts.external.directory.path" value="$PROJECT_DIR$/node_modules/typescript/lib" />
</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/resource/shopPanel" />
<recent name="$PROJECT_DIR$/resource/taskPanel" />
<recent name="$PROJECT_DIR$/src/panels" />
<recent name="$PROJECT_DIR$/resource/panel" />
<recent name="$PROJECT_DIR$/resource/exRecord" />
</key>
<key name="MoveFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/resource/panel" />
<recent name="$PROJECT_DIR$/resource/wareHouse" />
......@@ -58,6 +62,13 @@
<recent name="$PROJECT_DIR$/resource/shopPanel" />
<recent name="$PROJECT_DIR$/resource/exRecord" />
</key>
<key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/resource/wareHouse" />
<recent name="$PROJECT_DIR$/resource/shopPanel" />
<recent name="$PROJECT_DIR$/resource/taskPanel" />
<recent name="$PROJECT_DIR$/src/panels" />
<recent name="$PROJECT_DIR$/resource/panel" />
</key>
</component>
<component name="RunManager" selected="npm.dev">
<configuration name="dev" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
......@@ -92,9 +103,9 @@
</configuration>
<recent_temporary>
<list>
<item itemvalue="npm.dev" />
<item itemvalue="npm.flushRes" />
<item itemvalue="npm.handleRes" />
<item itemvalue="npm.dev" />
</list>
</recent_temporary>
</component>
......@@ -118,7 +129,7 @@
<workItem from="1591239841506" duration="24292000" />
<workItem from="1591321317628" duration="18063000" />
<workItem from="1591438071338" duration="597000" />
<workItem from="1591581198126" duration="2458000" />
<workItem from="1591581198126" duration="6225000" />
</task>
<task id="LOCAL-00001" summary="1">
<created>1591003912929</created>
......@@ -204,7 +215,14 @@
<option name="project" value="LOCAL" />
<updated>1591346651129</updated>
</task>
<option name="localTasksCounter" value="13" />
<task id="LOCAL-00013" summary="panels">
<created>1591583675849</created>
<option name="number" value="00013" />
<option name="presentableId" value="LOCAL-00013" />
<option name="project" value="LOCAL" />
<updated>1591583675850</updated>
</task>
<option name="localTasksCounter" value="14" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
......@@ -217,43 +235,44 @@
<MESSAGE value="task" />
<MESSAGE value="panel" />
<MESSAGE value="shop panel" />
<option name="LAST_COMMIT_MESSAGE" value="shop panel" />
<MESSAGE value="panels" />
<option name="LAST_COMMIT_MESSAGE" value="panels" />
</component>
<component name="WindowStateProjectService">
<state x="671" y="259" key="#com.intellij.ide.util.MemberChooser" timestamp="1591344864454">
<screen x="37" y="23" width="1643" height="1027" />
</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="467" y="108" key="CommitChangelistDialog2" timestamp="1591346650647">
<state x="467" y="108" key="CommitChangelistDialog2" timestamp="1591583675362">
<screen x="37" y="23" width="1643" height="1027" />
</state>
<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="467" y="108" key="CommitChangelistDialog2/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591346650647" />
<state width="1601" height="346" key="GridCell.Tab.0.bottom" timestamp="1591353787138">
<state x="467" y="108" key="CommitChangelistDialog2/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591583675362" />
<state width="293" height="907" key="GridCell.Tab.0.bottom" timestamp="1591587717998">
<screen x="37" y="23" width="1643" height="1027" />
</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="257" height="1057" key="GridCell.Tab.0.bottom/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591189627828" />
<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="1601" height="346" key="GridCell.Tab.0.center" timestamp="1591353787137">
<state width="293" height="907" key="GridCell.Tab.0.bottom/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591587717998" />
<state width="293" height="907" key="GridCell.Tab.0.center" timestamp="1591587717995">
<screen x="37" y="23" width="1643" height="1027" />
</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="257" height="1057" key="GridCell.Tab.0.center/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591189627827" />
<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="1601" height="346" key="GridCell.Tab.0.left" timestamp="1591353787137">
<state width="293" height="907" key="GridCell.Tab.0.center/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591587717995" />
<state width="293" height="907" key="GridCell.Tab.0.left" timestamp="1591587717990">
<screen x="37" y="23" width="1643" height="1027" />
</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="257" height="1057" key="GridCell.Tab.0.left/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591189627825" />
<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="1601" height="346" key="GridCell.Tab.0.right" timestamp="1591353787138">
<state width="293" height="907" key="GridCell.Tab.0.left/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591587717990" />
<state width="293" height="907" key="GridCell.Tab.0.right" timestamp="1591587717997">
<screen x="37" y="23" width="1643" height="1027" />
</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="257" height="1057" key="GridCell.Tab.0.right/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591189627828" />
<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 width="293" height="907" key="GridCell.Tab.0.right/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591587717997" />
<state x="446" y="278" key="IDE.errors.dialog" timestamp="1591150813027">
<screen x="37" y="23" width="1643" height="1027" />
</state>
......@@ -263,11 +282,11 @@
</state>
<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="457" y="276" key="Vcs.Push.Dialog.v2" timestamp="1591346652850">
<state x="457" y="276" key="Vcs.Push.Dialog.v2" timestamp="1591583677730">
<screen x="37" y="23" width="1643" height="1027" />
</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="457" y="276" key="Vcs.Push.Dialog.v2/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591346652850" />
<state x="457" y="276" key="Vcs.Push.Dialog.v2/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591583677730" />
<state x="417" y="141" key="com.intellij.openapi.editor.actions.MultiplePasteAction$ClipboardContentChooser" timestamp="1591269112575">
<screen x="37" y="23" width="1643" height="1027" />
</state>
......@@ -280,11 +299,11 @@
<screen x="35" y="23" width="1645" height="1027" />
</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="2248" y="61" width="783" height="775" key="search.everywhere.popup" timestamp="1591582557074">
<screen x="1680" y="-199" width="1920" height="1177" />
<state x="523" y="250" width="670" height="676" key="search.everywhere.popup" timestamp="1591585460380">
<screen x="37" y="23" width="1643" height="1027" />
</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="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="1591582542704" />
<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="1591585460380" />
</component>
</project>
\ No newline at end of file
......@@ -131,17 +131,17 @@
"atlas": "rulePanel.json"
},
{
"keys": "shop_icon.png",
"keys": "shop_icon.png,shop_item_bg.png,shop_mask.png",
"name": "shopPanel",
"atlas": "shopPanel.json"
},
{
"keys": "task_chat_icon.png,task_collection_icon.png,task_done.png,task_friend_icon.png,task_go.png,task_icon.png,task_item_bg.png,task_shop_icon.png,task_sign_icon.png",
"keys": "task_buy_icon.png,task_chat_icon.png,task_done.png,task_friend_icon.png,task_go.png,task_icon.png,task_item_bg.png,task_shop_icon.png,task_sign_icon.png,task_vip_icon.png",
"name": "taskPanel",
"atlas": "taskPanel.json"
},
{
"keys": "wareHouse_icon.png",
"keys": "wareHouse_icon.png,wareHouse_item_bg.png,wareHouse_山核桃.png,wareHouse_板栗.png,wareHouse_腰果.png,wareHouse_花生.png",
"name": "wareHouse",
"atlas": "wareHouse.json"
}
......
{
"shop_icon.png": {
"x": 2,
"x": 657,
"y": 2,
"w": 135,
"h": 185,
......@@ -9,5 +9,27 @@
"sw": 135,
"sh": 185,
"ro": false
},
"shop_item_bg.png": {
"x": 2,
"y": 2,
"w": 653,
"h": 207,
"ox": 0,
"oy": 0,
"sw": 653,
"sh": 207,
"ro": false
},
"shop_mask.png": {
"x": 2,
"y": 211,
"w": 653,
"h": 206,
"ox": 0,
"oy": 0,
"sw": 653,
"sh": 206,
"ro": false
}
}
\ No newline at end of file
{
"task_chat_icon.png": {
"x": 558,
"y": 184,
"task_buy_icon.png": {
"x": 697,
"y": 176,
"w": 137,
"h": 137,
"ox": 0,
......@@ -10,8 +10,8 @@
"sh": 137,
"ro": false
},
"task_collection_icon.png": {
"x": 419,
"task_chat_icon.png": {
"x": 558,
"y": 184,
"w": 137,
"h": 137,
......@@ -22,8 +22,8 @@
"ro": false
},
"task_done.png": {
"x": 765,
"y": 176,
"x": 836,
"y": 133,
"w": 71,
"h": 24,
"ox": 29,
......@@ -33,7 +33,7 @@
"ro": true
},
"task_friend_icon.png": {
"x": 280,
"x": 419,
"y": 184,
"w": 137,
"h": 137,
......@@ -44,8 +44,8 @@
"ro": false
},
"task_go.png": {
"x": 697,
"y": 176,
"x": 790,
"y": 2,
"w": 129,
"h": 66,
"ox": 0,
......@@ -77,7 +77,7 @@
"ro": false
},
"task_shop_icon.png": {
"x": 141,
"x": 280,
"y": 184,
"w": 137,
"h": 137,
......@@ -88,6 +88,17 @@
"ro": false
},
"task_sign_icon.png": {
"x": 141,
"y": 184,
"w": 137,
"h": 137,
"ox": 0,
"oy": 0,
"sw": 137,
"sh": 137,
"ro": false
},
"task_vip_icon.png": {
"x": 2,
"y": 184,
"w": 137,
......
{
"wareHouse_icon.png": {
"x": 2,
"x": 316,
"y": 2,
"w": 149,
"h": 178,
......@@ -9,5 +9,60 @@
"sw": 149,
"sh": 178,
"ro": false
},
"wareHouse_item_bg.png": {
"x": 2,
"y": 2,
"w": 312,
"h": 328,
"ox": 0,
"oy": 0,
"sw": 312,
"sh": 328,
"ro": false
},
"wareHouse_灞辨牳妗�.png": {
"x": 2,
"y": 332,
"w": 140,
"h": 164,
"ox": 0,
"oy": 0,
"sw": 140,
"sh": 164,
"ro": true
},
"wareHouse_鏉挎牀.png": {
"x": 316,
"y": 182,
"w": 140,
"h": 152,
"ox": 0,
"oy": 0,
"sw": 140,
"sh": 152,
"ro": true
},
"wareHouse_鑵版灉.png": {
"x": 168,
"y": 332,
"w": 133,
"h": 164,
"ox": 0,
"oy": 0,
"sw": 133,
"sh": 164,
"ro": true
},
"wareHouse_鑺辩敓.png": {
"x": 334,
"y": 324,
"w": 140,
"h": 148,
"ox": 0,
"oy": 0,
"sw": 140,
"sh": 148,
"ro": false
}
}
\ No newline at end of file
......@@ -113,7 +113,7 @@
"name": "taskPanel"
},
{
"keys": "wareHouse_icon.png",
"keys": "wareHouse_icon.png,wareHouse_item_bg.png,wareHouse_山核桃.png,wareHouse_开心果.png,wareHouse_板栗.png,wareHouse_瓜子.png,wareHouse_腰果.png,wareHouse_花生.png",
"name": "wareHouse"
}
],
......
......@@ -113,7 +113,7 @@ export const ResJson = {
"name": "taskPanel"
},
{
"keys": "wareHouse_icon.png",
"keys": "wareHouse_icon.png,wareHouse_item_bg.png,wareHouse_山核桃.png,wareHouse_开心果.png,wareHouse_板栗.png,wareHouse_瓜子.png,wareHouse_腰果.png,wareHouse_花生.png",
"name": "wareHouse"
}
],
......
......@@ -124,7 +124,7 @@ class TaskItem extends Container implements IScrollListItem {
// type: 'buy',
// name: '购买指定商品',
// tips: '今日完成下单即可领水滴',
// num: '60',
// count: '60',
// done: false,
// },
if (!data) return;
......
......@@ -4,6 +4,8 @@ import Sprite = FYGE.Sprite;
import { layers } from "../../module/views/layers";
import Tween = FYGE.Tween;
import Ease = FYGE.Ease;
import { Container, TextField } from "fyge";
import { PLANT_TYPE, s_PlantData } from "../const/staticData";
export default class WareHousePanel extends Panel {
get groupNames() {
......@@ -21,6 +23,8 @@ export default class WareHousePanel extends Panel {
this.closeBtn = this.addChild(Tool.getSprite('closeBtn.png'));
this.closeBtn.position.set(670, -50);
this.addChild(new WareHouseItem(PLANT_TYPE.Cashew))
}
public showAni() {
......@@ -49,3 +53,36 @@ export default class WareHousePanel extends Panel {
}
}
class WareHouseItem extends Container {
private countLabel: TextField;
private _count: number = 0;
public get count(): number {
return this._count;
}
public set count(count: number) {
this._count = count;
this.countLabel && (this.countLabel.text = `数量:${this._count}`);
}
constructor(type: PLANT_TYPE) {
super();
this.count = 0;
this.addChild(Tool.getSprite('wareHouse_item_bg.png'));
const plantIcon = this.addChild(Tool.getSprite(`wareHouse_${s_PlantData[type].name}.png`));
plantIcon.position.set((this.width - plantIcon.width) / 2, 35);
const nameLabel = this.addChild(Tool.getText(s_PlantData[type].name, 28, '#a65310'));
nameLabel.position.set((this.width - nameLabel.textWidth) / 2, 212);
this.countLabel = this.addChild(Tool.getText('数量:0', 22, '#9a9a9a'));
this.countLabel.position.set(111, 258);
}
}
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