Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qiaqia_qx
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
邱旭
qiaqia_qx
Commits
c9998dbe
Commit
c9998dbe
authored
Jun 08, 2020
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wareHouse
parent
eaac9f93
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
84 additions
and
58 deletions
+84
-58
workspace.xml
.idea/workspace.xml
+14
-6
package.json
package.json
+39
-39
WareHousePanel.ts
src/panels/WareHousePanel.ts
+31
-13
No files found.
.idea/workspace.xml
View file @
c9998dbe
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
<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
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$/package.json"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/package.json"
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/panels/WareHousePanel.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/panels/WareHousePanel.ts"
afterDir=
"false"
/>
</list>
</list>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
...
@@ -113,7 +114,7 @@
...
@@ -113,7 +114,7 @@
<workItem
from=
"1591321317628"
duration=
"18063000"
/>
<workItem
from=
"1591321317628"
duration=
"18063000"
/>
<workItem
from=
"1591438071338"
duration=
"597000"
/>
<workItem
from=
"1591438071338"
duration=
"597000"
/>
<workItem
from=
"1591581198126"
duration=
"7855000"
/>
<workItem
from=
"1591581198126"
duration=
"7855000"
/>
<workItem
from=
"1591594488054"
duration=
"
395
000"
/>
<workItem
from=
"1591594488054"
duration=
"
2684
000"
/>
</task>
</task>
<task
id=
"LOCAL-00001"
summary=
"1"
>
<task
id=
"LOCAL-00001"
summary=
"1"
>
<created>
1591003912929
</created>
<created>
1591003912929
</created>
...
@@ -213,7 +214,14 @@
...
@@ -213,7 +214,14 @@
<option
name=
"project"
value=
"LOCAL"
/>
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1591587981483
</updated>
<updated>
1591587981483
</updated>
</task>
</task>
<option
name=
"localTasksCounter"
value=
"15"
/>
<task
id=
"LOCAL-00015"
summary=
"wareHouse"
>
<created>
1591594902967
</created>
<option
name=
"number"
value=
"00015"
/>
<option
name=
"presentableId"
value=
"LOCAL-00015"
/>
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1591594902967
</updated>
</task>
<option
name=
"localTasksCounter"
value=
"16"
/>
<servers
/>
<servers
/>
</component>
</component>
<component
name=
"TypeScriptGeneratedFilesManager"
>
<component
name=
"TypeScriptGeneratedFilesManager"
>
...
@@ -236,12 +244,12 @@
...
@@ -236,12 +244,12 @@
<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=
"15915
87980954
"
>
<state
x=
"467"
y=
"108"
key=
"CommitChangelistDialog2"
timestamp=
"15915
94902601
"
>
<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=
"15915
87980954
"
/>
<state
x=
"467"
y=
"108"
key=
"CommitChangelistDialog2/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027"
timestamp=
"15915
94902601
"
/>
<state
width=
"293"
height=
"907"
key=
"GridCell.Tab.0.bottom"
timestamp=
"1591594033795"
>
<state
width=
"293"
height=
"907"
key=
"GridCell.Tab.0.bottom"
timestamp=
"1591594033795"
>
<screen
x=
"37"
y=
"23"
width=
"1643"
height=
"1027"
/>
<screen
x=
"37"
y=
"23"
width=
"1643"
height=
"1027"
/>
</state>
</state>
...
@@ -292,11 +300,11 @@
...
@@ -292,11 +300,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=
"15915
85460380
"
>
<state
x=
"523"
y=
"250"
width=
"670"
height=
"676"
key=
"search.everywhere.popup"
timestamp=
"15915
96914891
"
>
<screen
x=
"37"
y=
"23"
width=
"1643"
height=
"1027"
/>
<screen
x=
"37"
y=
"23"
width=
"1643"
height=
"1027"
/>
</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=
"1591582557074"
/>
<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=
"15915
85460380
"
/>
<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=
"15915
96914891
"
/>
</component>
</component>
</project>
</project>
\ No newline at end of file
package.json
View file @
c9998dbe
src/panels/WareHousePanel.ts
View file @
c9998dbe
...
@@ -4,7 +4,7 @@ import Sprite = FYGE.Sprite;
...
@@ -4,7 +4,7 @@ import Sprite = FYGE.Sprite;
import
{
layers
}
from
"../../module/views/layers"
;
import
{
layers
}
from
"../../module/views/layers"
;
import
Tween
=
FYGE
.
Tween
;
import
Tween
=
FYGE
.
Tween
;
import
Ease
=
FYGE
.
Ease
;
import
Ease
=
FYGE
.
Ease
;
import
{
Container
,
TextField
}
from
"fyge"
;
import
{
Container
,
ScrollPage
,
TextField
}
from
"fyge"
;
import
{
PLANT_TYPE
,
s_PlantData
}
from
"../const/staticData"
;
import
{
PLANT_TYPE
,
s_PlantData
}
from
"../const/staticData"
;
export
default
class
WareHousePanel
extends
Panel
{
export
default
class
WareHousePanel
extends
Panel
{
...
@@ -12,7 +12,8 @@ export default class WareHousePanel extends Panel {
...
@@ -12,7 +12,8 @@ export default class WareHousePanel extends Panel {
return
[
"wareHouse"
];
return
[
"wareHouse"
];
}
}
closeBtn
:
Sprite
;
private
closeBtn
:
Sprite
;
private
items
=
{};
initUi
()
{
initUi
()
{
this
.
addChild
(
Tool
.
getSprite
(
"comm_bg.png"
))
this
.
addChild
(
Tool
.
getSprite
(
"comm_bg.png"
))
...
@@ -24,14 +25,29 @@ export default class WareHousePanel extends Panel {
...
@@ -24,14 +25,29 @@ export default class WareHousePanel extends Panel {
this
.
closeBtn
=
this
.
addChild
(
Tool
.
getSprite
(
'closeBtn.png'
));
this
.
closeBtn
=
this
.
addChild
(
Tool
.
getSprite
(
'closeBtn.png'
));
this
.
closeBtn
.
position
.
set
(
670
,
-
50
);
this
.
closeBtn
.
position
.
set
(
670
,
-
50
);
this
.
addChild
(
new
WareHouseItem
(
PLANT_TYPE
.
Cashew
));
const
scroll
=
this
.
addChild
(
new
ScrollPage
(
666
,
765
,
1064
,
true
));
scroll
.
position
.
set
(
43
,
210
);
const
pos
=
[
[
0
,
0
],
[
354
,
0
],
[
0
,
368
],
[
354
,
368
],
[
0
,
736
],
[
354
,
736
],
];
let
i
=
0
;
for
(
let
k
in
s_PlantData
)
{
this
.
items
[
k
]
=
scroll
.
view
.
addChild
(
new
WareHouseItem
(
k
));
this
.
items
[
k
].
position
.
set
(
pos
[
i
][
0
],
pos
[
i
][
1
]);
i
++
;
}
}
}
public
showAni
()
{
public
showAni
()
{
if
(
this
.
isShowing
)
return
;
if
(
this
.
isShowing
)
return
;
this
.
isShowing
=
true
;
this
.
isShowing
=
true
;
this
.
y
=
this
.
height
;
this
.
y
=
this
.
height
;
const
_y
=
1624
-
this
.
height
-
layers
.
stageOffsetY
+
50
+
5
0
;
const
_y
=
1624
-
this
.
height
-
layers
.
stageOffsetY
+
50
+
10
0
;
Tween
.
get
(
this
)
Tween
.
get
(
this
)
.
to
({
y
:
_y
},
500
,
Ease
.
quartOut
)
.
to
({
y
:
_y
},
500
,
Ease
.
quartOut
)
.
call
(()
=>
{
.
call
(()
=>
{
...
@@ -64,33 +80,35 @@ class WareHouseItem extends Container {
...
@@ -64,33 +80,35 @@ class WareHouseItem extends Container {
public
set
count
(
count
:
number
)
{
public
set
count
(
count
:
number
)
{
this
.
_count
=
count
;
this
.
_count
=
count
;
this
.
countLabel
&&
(
this
.
countLabel
.
text
=
`数量:
${
this
.
_count
}
`
)
;
this
.
countLabel
.
text
=
`数量:
${
this
.
_count
}
`
;
}
}
private
_type
:
PLANT_TYPE
;
private
_type
:
PLANT_TYPE
|
string
;
public
get
type
():
PLANT_TYPE
{
public
get
type
():
PLANT_TYPE
|
string
{
return
this
.
_type
;
return
this
.
_type
;
}
}
public
set
type
(
type
:
PLANT_TYPE
)
{
public
set
type
(
type
:
PLANT_TYPE
|
string
)
{
this
.
_type
=
type
;
this
.
_type
=
type
;
}
}
constructor
(
type
:
PLANT_TYPE
)
{
constructor
(
type
:
PLANT_TYPE
|
string
)
{
super
();
super
();
this
.
count
=
0
;
this
.
addChild
(
Tool
.
getSprite
(
'wareHouse_item_bg.png'
));
this
.
addChild
(
Tool
.
getSprite
(
'wareHouse_item_bg.png'
));
const
plantIcon
=
this
.
addChild
(
Tool
.
getSprite
(
`wareHouse_
${
s_PlantData
[
type
].
name
}
.png`
));
const
plantIcon
=
this
.
addChild
(
Tool
.
getSprite
(
`wareHouse_
${
s_PlantData
[
type
].
name
}
.png`
));
plantIcon
.
position
.
set
((
this
.
width
-
plantIcon
.
width
)
/
2
,
35
);
plantIcon
.
position
.
set
((
this
.
width
-
plantIcon
.
width
)
/
2
,
35
);
const
nameLabel
=
this
.
addChild
(
Tool
.
getText
(
s_PlantData
[
type
].
name
,
28
,
'#a65310'
));
const
nameLabel
=
this
.
addChild
(
Tool
.
getText
(
s_PlantData
[
type
].
name
,
28
,
'#a65310'
));
nameLabel
.
position
.
set
((
this
.
width
-
nameLabel
.
textWidth
)
/
2
,
212
);
nameLabel
.
position
.
set
((
this
.
width
-
nameLabel
.
textWidth
)
/
2
,
212
);
this
.
countLabel
=
this
.
addChild
(
Tool
.
getText
(
'数量:0'
,
22
,
'#9a9a9a'
));
this
.
countLabel
=
this
.
addChild
(
Tool
.
getText
(
'数量:0'
,
22
,
'#9a9a9a'
));
this
.
countLabel
.
position
.
set
(
111
,
258
);
this
.
countLabel
.
position
.
set
(
111
,
258
);
this
.
count
=
0
;
this
.
type
=
type
;
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment