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
2e56a2ce
Commit
2e56a2ce
authored
Jun 08, 2020
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ExchangePanel
parent
3112aa83
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
136 additions
and
49 deletions
+136
-49
workspace.xml
.idea/workspace.xml
+41
-27
exchange_bg.png
resource/exchangePanel/exchange_bg.png
+0
-0
exchange_btn_dis.png
resource/exchangePanel/exchange_btn_dis.png
+0
-0
exchange_btn_en.png
resource/exchangePanel/exchange_btn_en.png
+0
-0
res.json
resource/res.json
+4
-0
ResJson.ts
src/ResJson.ts
+4
-0
ExRecordPanel.ts
src/panels/ExRecordPanel.ts
+2
-4
ExchangePanel.ts
src/panels/ExchangePanel.ts
+31
-5
ShopPanel.ts
src/panels/ShopPanel.ts
+50
-9
TaskPanel.ts
src/panels/TaskPanel.ts
+2
-2
WareHousePanel.ts
src/panels/WareHousePanel.ts
+2
-2
No files found.
.idea/workspace.xml
View file @
2e56a2ce
...
...
@@ -2,8 +2,14 @@
<project
version=
"4"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"31be0130-d27d-4740-b668-956a8050e1bf"
name=
"Default Changelist"
comment=
""
>
<change
afterPath=
"$PROJECT_DIR$/resource/exchangePanel/exchange_bg.png"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/resource/exchangePanel/exchange_btn_dis.png"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/resource/exchangePanel/exchange_btn_en.png"
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/ExchangePanel.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/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"
/>
...
...
@@ -33,7 +39,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/
wareHouse
"
/>
<property
name=
"last_opened_file_path"
value=
"$PROJECT_DIR$/resource/
exchangePanel
"
/>
<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"
/>
...
...
@@ -41,6 +47,13 @@
<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/exchangePanel"
/>
<recent
name=
"$PROJECT_DIR$/resource/exchange"
/>
<recent
name=
"$PROJECT_DIR$/resource/wareHouse"
/>
<recent
name=
"$PROJECT_DIR$/resource/shopPanel"
/>
<recent
name=
"$PROJECT_DIR$/resource/taskPanel"
/>
</key>
<key
name=
"MoveFile.RECENT_KEYS"
>
<recent
name=
"$PROJECT_DIR$/resource/panel"
/>
<recent
name=
"$PROJECT_DIR$/resource/wareHouse"
/>
...
...
@@ -48,15 +61,8 @@
<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
"
>
<component
name=
"RunManager"
selected=
"npm.
flushRes
"
>
<configuration
name=
"dev"
type=
"js.build_tools.npm"
temporary=
"true"
nameIsGenerated=
"true"
>
<package-json
value=
"$PROJECT_DIR$/package.json"
/>
<command
value=
"run"
/>
...
...
@@ -89,8 +95,8 @@
</configuration>
<recent_temporary>
<list>
<item
itemvalue=
"npm.dev"
/>
<item
itemvalue=
"npm.flushRes"
/>
<item
itemvalue=
"npm.dev"
/>
<item
itemvalue=
"npm.handleRes"
/>
</list>
</recent_temporary>
...
...
@@ -116,7 +122,7 @@
<workItem
from=
"1591321317628"
duration=
"18063000"
/>
<workItem
from=
"1591438071338"
duration=
"597000"
/>
<workItem
from=
"1591581198126"
duration=
"7855000"
/>
<workItem
from=
"1591594488054"
duration=
"
4754
000"
/>
<workItem
from=
"1591594488054"
duration=
"
7575
000"
/>
</task>
<task
id=
"LOCAL-00001"
summary=
"1"
>
<created>
1591003912929
</created>
...
...
@@ -230,7 +236,14 @@
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1591597197649
</updated>
</task>
<option
name=
"localTasksCounter"
value=
"17"
/>
<task
id=
"LOCAL-00017"
summary=
"hideEffect"
>
<created>
1591599295976
</created>
<option
name=
"number"
value=
"00017"
/>
<option
name=
"presentableId"
value=
"LOCAL-00017"
/>
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1591599295976
</updated>
</task>
<option
name=
"localTasksCounter"
value=
"18"
/>
<servers
/>
</component>
<component
name=
"TypeScriptGeneratedFilesManager"
>
...
...
@@ -246,43 +259,44 @@
<MESSAGE
value=
"shop panel"
/>
<MESSAGE
value=
"panels"
/>
<MESSAGE
value=
"wareHouse"
/>
<option
name=
"LAST_COMMIT_MESSAGE"
value=
"wareHouse"
/>
<MESSAGE
value=
"hideEffect"
/>
<option
name=
"LAST_COMMIT_MESSAGE"
value=
"hideEffect"
/>
</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=
"159159
7197357
"
>
<state
x=
"467"
y=
"108"
key=
"CommitChangelistDialog2"
timestamp=
"159159
9295645
"
>
<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=
"159159
7197357
"
/>
<state
width=
"293"
height=
"907"
key=
"GridCell.Tab.0.bottom"
timestamp=
"159159
4033795
"
>
<state
x=
"467"
y=
"108"
key=
"CommitChangelistDialog2/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027"
timestamp=
"159159
9295645
"
/>
<state
width=
"293"
height=
"907"
key=
"GridCell.Tab.0.bottom"
timestamp=
"159159
9693061
"
>
<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=
"293"
height=
"907"
key=
"GridCell.Tab.0.bottom/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027"
timestamp=
"159159
4033795
"
/>
<state
width=
"293"
height=
"907"
key=
"GridCell.Tab.0.center"
timestamp=
"159159
4033794
"
>
<state
width=
"293"
height=
"907"
key=
"GridCell.Tab.0.bottom/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027"
timestamp=
"159159
9693061
"
/>
<state
width=
"293"
height=
"907"
key=
"GridCell.Tab.0.center"
timestamp=
"159159
9693059
"
>
<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=
"293"
height=
"907"
key=
"GridCell.Tab.0.center/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027"
timestamp=
"159159
4033794
"
/>
<state
width=
"293"
height=
"907"
key=
"GridCell.Tab.0.left"
timestamp=
"159159
4033793
"
>
<state
width=
"293"
height=
"907"
key=
"GridCell.Tab.0.center/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027"
timestamp=
"159159
9693059
"
/>
<state
width=
"293"
height=
"907"
key=
"GridCell.Tab.0.left"
timestamp=
"159159
9693058
"
>
<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=
"293"
height=
"907"
key=
"GridCell.Tab.0.left/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027"
timestamp=
"159159
4033793
"
/>
<state
width=
"293"
height=
"907"
key=
"GridCell.Tab.0.right"
timestamp=
"159159
4033794
"
>
<state
width=
"293"
height=
"907"
key=
"GridCell.Tab.0.left/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027"
timestamp=
"159159
9693058
"
/>
<state
width=
"293"
height=
"907"
key=
"GridCell.Tab.0.right"
timestamp=
"159159
9693060
"
>
<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=
"293"
height=
"907"
key=
"GridCell.Tab.0.right/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027"
timestamp=
"159159
4033794
"
/>
<state
width=
"293"
height=
"907"
key=
"GridCell.Tab.0.right/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027"
timestamp=
"159159
9693060
"
/>
<state
x=
"446"
y=
"278"
key=
"IDE.errors.dialog"
timestamp=
"1591150813027"
>
<screen
x=
"37"
y=
"23"
width=
"1643"
height=
"1027"
/>
</state>
...
...
@@ -292,11 +306,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=
"159159
7198994
"
>
<state
x=
"457"
y=
"276"
key=
"Vcs.Push.Dialog.v2"
timestamp=
"159159
9298076
"
>
<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=
"159159
7198994
"
/>
<state
x=
"457"
y=
"276"
key=
"Vcs.Push.Dialog.v2/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027"
timestamp=
"159159
9298076
"
/>
<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>
...
...
@@ -309,11 +323,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=
"523"
y=
"250"
width=
"670"
height=
"676"
key=
"search.everywhere.popup"
timestamp=
"159159
6914891
"
>
<state
x=
"523"
y=
"250"
width=
"670"
height=
"676"
key=
"search.everywhere.popup"
timestamp=
"159159
9584027
"
>
<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=
"159159
6914891
"
/>
<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=
"159159
9584027
"
/>
</component>
</project>
\ No newline at end of file
resource/exchangePanel/exchange_bg.png
0 → 100644
View file @
2e56a2ce
9.64 KB
resource/exchangePanel/exchange_btn_dis.png
0 → 100644
View file @
2e56a2ce
4.32 KB
resource/exchangePanel/exchange_btn_en.png
0 → 100644
View file @
2e56a2ce
3.99 KB
resource/res.json
View file @
2e56a2ce
...
...
@@ -84,6 +84,10 @@
"keys"
:
"exSuccessPanel_bg.png,exSuccessPanel_btn.png"
,
"name"
:
"exSuccessPanel"
},
{
"keys"
:
"exchange_bg.png,exchange_btn_dis.png,exchange_btn_en.png"
,
"name"
:
"exchangePanel"
},
{
"keys"
:
"btn_仓库.png,btn_兑换记录.png,btn_商店.png,btn_规则.png,btn_领水滴.png,game_bg.jpg,广告.png,用户_bg.png,用户_头像.png,用户_水.png,田_初始.png,田_种植.png,田_选择.png,种植框_bg.png,种植框_left.png,种植框_right.png,种植框_山核桃.png,种植框_开心果.png,种植框_板栗.png,种植框_瓜子.png,种植框_腰果.png,种植框_花生.png,种植框_袋子.png,进度_bg.png,进度_fill.png"
,
"name"
:
"gameScene"
...
...
src/ResJson.ts
View file @
2e56a2ce
...
...
@@ -84,6 +84,10 @@ export const ResJson = {
"keys"
:
"exSuccessPanel_bg.png,exSuccessPanel_btn.png"
,
"name"
:
"exSuccessPanel"
},
{
"keys"
:
"exchange_bg.png,exchange_btn_dis.png,exchange_btn_en.png"
,
"name"
:
"exchangePanel"
},
{
"keys"
:
"btn_仓库.png,btn_兑换记录.png,btn_商店.png,btn_规则.png,btn_领水滴.png,game_bg.jpg,广告.png,用户_bg.png,用户_头像.png,用户_水.png,田_初始.png,田_种植.png,田_选择.png,种植框_bg.png,种植框_left.png,种植框_right.png,种植框_山核桃.png,种植框_开心果.png,种植框_板栗.png,种植框_瓜子.png,种植框_腰果.png,种植框_花生.png,种植框_袋子.png,进度_bg.png,进度_fill.png"
,
"name"
:
"gameScene"
...
...
src/panels/ExRecordPanel.ts
View file @
2e56a2ce
...
...
@@ -67,7 +67,7 @@ export default class ExRecordPanel extends Panel {
public
showAni
()
{
if
(
this
.
isShowing
)
return
;
this
.
isShowing
=
true
;
this
.
y
=
this
.
height
+
layers
.
stageOffsetY
*
2
+
100
;
this
.
y
=
1624
-
layers
.
stageOffsetY
+
100
;
const
_y
=
1624
-
this
.
height
-
layers
.
stageOffsetY
+
50
+
100
;
Tween
.
get
(
this
)
.
to
({
y
:
_y
},
500
,
Ease
.
quartOut
)
...
...
@@ -78,7 +78,7 @@ export default class ExRecordPanel extends Panel {
public
hideAni
()
{
return
Tween
.
get
(
this
)
.
to
({
y
:
this
.
height
+
layers
.
stageOffsetY
*
2
+
100
},
500
,
Ease
.
quartOut
);
.
to
({
y
:
1624
-
layers
.
stageOffsetY
+
100
},
500
,
Ease
.
quartOut
);
}
public
hidePanel
()
{
...
...
@@ -133,8 +133,6 @@ class RecordItem extends Container implements IScrollListItem {
this
.
prizeDate
=
this
.
addChild
(
Tool
.
getText
(
''
,
22
,
'#999999'
));
this
.
prizeDate
.
position
.
set
(
176
,
91
);
}
}
src/panels/ExchangePanel.ts
View file @
2e56a2ce
import
{
Panel
}
from
"../../module/views/Panel"
;
import
{
Tool
}
from
"../Tools"
;
import
Sprite
=
FYGE
.
Sprite
;
import
{
Graphics
,
Texture
}
from
"fyge"
;
export
class
ExchangePanel
extends
Panel
{
get
groupNames
()
{
return
[
"exchangePanel"
];
}
closeBtn
:
Sprite
;
private
closeBtn
:
Sprite
;
private
btn
:
Sprite
;
initUi
()
{
this
.
addChild
(
Tool
.
getSprite
(
"
rul
e_bg.png"
));
this
.
addChild
(
Tool
.
getSprite
(
"
exchang
e_bg.png"
));
this
.
closeBtn
=
this
.
addChild
(
Tool
.
getSprite
(
'closeBtn.png'
));
this
.
closeBtn
.
position
.
set
(
600
,
350
);
this
.
closeBtn
.
position
.
set
(
570
,
634
);
this
.
closeBtn
.
height
=
this
.
closeBtn
.
width
=
44
;
console
.
log
(
'ExchangePanel'
,
this
.
data
);
const
nameLabel
=
this
.
addChild
(
Tool
.
getText
(
this
.
data
.
prizeName
,
26
,
'#ffffff'
));
nameLabel
.
position
.
set
((
this
.
width
-
nameLabel
.
textWidth
)
/
2
,
710
);
const
prizeImg
=
this
.
addChild
(
new
Sprite
());
prizeImg
.
texture
=
Texture
.
fromUrl
(
this
.
data
.
prizeImg
);
// prizeImg.texture.addEventListener('update', () => {
prizeImg
.
position
.
set
((
this
.
width
-
143
)
/
2
,
523
);
prizeImg
.
width
=
prizeImg
.
height
=
143
;
// });
const
imgMask
=
this
.
addChild
(
new
Graphics
());
imgMask
.
position
.
set
((
this
.
width
-
143
)
/
2
,
523
);
imgMask
.
drawCircle
(
71.5
,
71.5
,
71.5
);
prizeImg
.
mask
=
imgMask
;
this
.
btn
=
this
.
addChild
(
Tool
.
getSprite
(
this
.
data
.
count
>
0
?
'exchange_btn_en.png'
:
'exchange_btn_dis.png'
)
);
this
.
btn
.
position
.
set
((
this
.
width
-
this
.
btn
.
width
)
/
2
,
876
);
}
start
(
data
)
{
...
...
src/panels/ShopPanel.ts
View file @
2e56a2ce
...
...
@@ -9,7 +9,10 @@ import ScrollList = FYGE.ScrollList;
import
Texture
=
FYGE
.
Texture
;
import
Graphics
=
FYGE
.
Graphics
;
import
TextField
=
FYGE
.
TextField
;
import
{
Ease
}
from
"fyge"
;
import
{
Ease
,
MouseEvent
}
from
"fyge"
;
import
panelCtrl
from
"../../module/ctrls/panelCtrl"
;
import
PanelCtrl
from
"../../module/ctrls/panelCtrl"
;
import
{
ExchangePanel
}
from
"./ExchangePanel"
;
export
default
class
ShopPanel
extends
Panel
{
get
groupNames
()
{
...
...
@@ -32,7 +35,36 @@ export default class ShopPanel extends Panel {
this
.
scroll
=
this
.
addChild
(
new
ScrollList
(
ShopItem
,
635
,
227
,
635
,
830
));
this
.
scroll
.
position
.
set
((
this
.
width
-
this
.
scroll
.
width
)
/
2
,
210
);
this
.
scroll
.
updateData
([
1
,
2
,
3
,
4
,
5
,
6
{
prizeName
:
'恰恰免单'
,
prizeImg
:
'https://source.unsplash.com/user/erondu/116x116'
,
count
:
0
,
},
{
prizeName
:
'恰恰-50元加价卷'
,
prizeImg
:
'https://source.unsplash.com/user/erondu/116x116'
,
count
:
1000
,
},
{
prizeName
:
'恰恰-100元加价卷'
,
prizeImg
:
'https://source.unsplash.com/user/erondu/116x116'
,
count
:
10000
,
},
{
prizeName
:
'恰恰-1折卷'
,
prizeImg
:
'https://source.unsplash.com/user/erondu/116x116'
,
count
:
10000
,
},
{
prizeName
:
'恰恰-5折卷'
,
prizeImg
:
'https://source.unsplash.com/user/erondu/116x116'
,
count
:
5000
,
},
{
prizeName
:
'恰恰-9折卷'
,
prizeImg
:
'https://source.unsplash.com/user/erondu/116x116'
,
count
:
1000
,
},
]);
}
...
...
@@ -40,7 +72,7 @@ export default class ShopPanel extends Panel {
public
showAni
()
{
if
(
this
.
isShowing
)
return
;
this
.
isShowing
=
true
;
this
.
y
=
this
.
height
+
layers
.
stageOffsetY
*
2
+
100
;
this
.
y
=
1624
-
layers
.
stageOffsetY
+
100
;
const
_y
=
1624
-
this
.
height
-
layers
.
stageOffsetY
+
50
+
100
;
Tween
.
get
(
this
)
.
to
({
y
:
_y
},
500
,
Ease
.
quartOut
)
...
...
@@ -51,7 +83,7 @@ export default class ShopPanel extends Panel {
public
hideAni
()
{
return
Tween
.
get
(
this
)
.
to
({
y
:
this
.
height
+
layers
.
stageOffsetY
*
2
+
100
},
500
,
Ease
.
quartOut
);
.
to
({
y
:
1624
-
layers
.
stageOffsetY
+
100
},
500
,
Ease
.
quartOut
);
}
public
hidePanel
()
{
...
...
@@ -86,6 +118,18 @@ class ShopItem extends Container implements IScrollListItem {
public
initData
(
id
:
number
,
data
:
any
):
void
{
if
(
!
data
)
return
;
this
.
data
=
data
;
this
.
itemName
.
text
=
data
.
prizeName
;
this
.
itemImg
.
texture
=
Texture
.
fromUrl
(
data
.
prizeImg
);
this
.
itemNum
.
text
=
(
data
.
count
<=
0
)
?
'来晚一步,抢光了'
:
`剩余
${
data
.
count
}
份`
;
this
.
itemNum
.
position
.
set
((
this
.
width
-
this
.
itemNum
.
textWidth
)
/
2
,
176
);
this
.
itemMask
.
visible
=
(
data
.
count
<=
0
);
this
.
removeAllEventListener
();
(
data
.
count
>
0
)
&&
this
.
addEventListener
(
MouseEvent
.
CLICK
,
()
=>
{
PanelCtrl
.
instance
.
show
(
ExchangePanel
,
this
.
data
);
});
}
constructor
()
{
...
...
@@ -94,7 +138,6 @@ class ShopItem extends Container implements IScrollListItem {
this
.
itemImg
=
this
.
addChild
(
new
Sprite
());
this
.
itemImg
.
position
.
set
(
35
,
26
);
this
.
itemImg
.
texture
=
Texture
.
fromUrl
(
'https://source.unsplash.com/user/erondu/116x116'
);
const
mask
=
this
.
addChild
(
new
Graphics
());
mask
.
drawCircle
(
92
,
83
,
58
);
...
...
@@ -103,13 +146,11 @@ class ShopItem extends Container implements IScrollListItem {
this
.
itemMask
=
this
.
addChild
(
Tool
.
getSprite
(
'shop_mask.png'
));
this
.
itemMask
.
visible
=
false
;
this
.
itemName
=
this
.
addChild
(
Tool
.
getText
(
'
恰恰50元抵扣卷
'
,
26
,
'#4a4a4a'
));
this
.
itemName
=
this
.
addChild
(
Tool
.
getText
(
''
,
26
,
'#4a4a4a'
));
this
.
itemName
.
position
.
set
(
185
,
24
);
this
.
itemNum
=
this
.
addChild
(
Tool
.
getText
(
'剩余
800
0份'
,
18
,
'#f94c2a'
));
this
.
itemNum
=
this
.
addChild
(
Tool
.
getText
(
'剩余0份'
,
18
,
'#f94c2a'
));
this
.
itemNum
.
position
.
set
((
this
.
width
-
this
.
itemNum
.
textWidth
)
/
2
,
176
);
}
}
src/panels/TaskPanel.ts
View file @
2e56a2ce
...
...
@@ -81,7 +81,7 @@ export default class TaskPanel extends Panel {
public
showAni
()
{
if
(
this
.
isShowing
)
return
;
this
.
isShowing
=
true
;
this
.
y
=
this
.
height
+
layers
.
stageOffsetY
*
2
+
100
;
this
.
y
=
1624
-
layers
.
stageOffsetY
+
100
;
const
_y
=
1624
-
this
.
height
-
layers
.
stageOffsetY
+
50
+
100
;
Tween
.
get
(
this
)
.
to
({
y
:
_y
},
500
,
Ease
.
quartOut
)
...
...
@@ -92,7 +92,7 @@ export default class TaskPanel extends Panel {
public
hideAni
()
{
return
Tween
.
get
(
this
)
.
to
({
y
:
this
.
height
+
layers
.
stageOffsetY
*
2
+
100
},
500
,
Ease
.
quartOut
);
.
to
({
y
:
1624
-
layers
.
stageOffsetY
+
100
},
500
,
Ease
.
quartOut
);
}
public
hidePanel
()
{
...
...
src/panels/WareHousePanel.ts
View file @
2e56a2ce
...
...
@@ -46,7 +46,7 @@ export default class WareHousePanel extends Panel {
public
showAni
()
{
if
(
this
.
isShowing
)
return
;
this
.
isShowing
=
true
;
this
.
y
=
this
.
height
+
layers
.
stageOffsetY
*
2
+
100
;
this
.
y
=
1624
-
layers
.
stageOffsetY
+
100
;
const
_y
=
1624
-
this
.
height
-
layers
.
stageOffsetY
+
50
+
100
;
Tween
.
get
(
this
)
.
to
({
y
:
_y
},
500
,
Ease
.
quartOut
)
...
...
@@ -57,7 +57,7 @@ export default class WareHousePanel extends Panel {
public
hideAni
()
{
return
Tween
.
get
(
this
)
.
to
({
y
:
this
.
height
+
layers
.
stageOffsetY
*
2
+
100
},
500
,
Ease
.
quartOut
);
.
to
({
y
:
1624
-
layers
.
stageOffsetY
+
100
},
500
,
Ease
.
quartOut
);
}
public
hidePanel
()
{
...
...
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