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
c95af6bd
Commit
c95af6bd
authored
Jun 02, 2020
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
02e2d983
Changes
22
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
384 additions
and
200 deletions
+384
-200
workspace.xml
.idea/workspace.xml
+37
-28
gameScene.json
released/resource/gameScene/gameScene.json
+60
-60
gameScene.png
released/resource/gameScene/gameScene.png
+0
-0
loadingScene.json
released/resource/loadingScene/loadingScene.json
+46
-0
loadingScene.png
released/resource/loadingScene/loadingScene.png
+0
-0
loading_bg.jpg
released/resource/loadingScene/loading_bg.jpg
+0
-0
res.json
released/resource/res.json
+5
-0
loading_bg.jpg
resource/loadingScene/loading_bg.jpg
+0
-0
loading_per_bg.png
resource/loadingScene/loading_per_bg.png
+0
-0
loading_per_fill.png
resource/loadingScene/loading_per_fill.png
+0
-0
loading_title.png
resource/loadingScene/loading_title.png
+0
-0
loading_绳子.png
resource/loadingScene/loading_绳子.png
+0
-0
res.json
resource/res.json
+4
-0
textureMerge.js
scripts/textureMerge.js
+94
-96
Main.ts
src/Main.ts
+5
-10
ResJson.ts
src/ResJson.ts
+4
-0
TaoBaoNet.ts
src/TaoBaoNet.ts
+11
-0
GameLayer.ts
src/parts/Game/GameLayer.ts
+0
-2
Option.ts
src/parts/Game/Option.ts
+2
-2
PlantList.ts
src/parts/Game/PlantList.ts
+13
-1
GameScene.ts
src/scenes/GameScene.ts
+1
-1
LoadingScene.ts
src/scenes/LoadingScene.ts
+102
-0
No files found.
.idea/workspace.xml
View file @
c95af6bd
...
@@ -2,18 +2,19 @@
...
@@ -2,18 +2,19 @@
<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$/mock/miniTb/rule.json"
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$/mock/config.js"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/mock/config.js"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/released/resource/gameScene/gameScene.json"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/released/resource/gameScene/gameScene.json"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/released/resource/gameScene/gameScene.png"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/released/resource/gameScene/gameScene.png"
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$/resource/res.json"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/resource/res.json"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/scripts/textureMerge.js"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/scripts/textureMerge.js"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/Main.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/Main.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/Main.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/Main.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/ResJson.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/ResJson.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/TaoBaoNet.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/TaoBaoNet.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/TaoBaoNet.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/TaoBaoNet.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/panels/RulePanel.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/panels/RulePanel.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/panels/UnlockPanel.ts"
beforeDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/parts/Game/GameLayer.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/parts/Game/GameLayer.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/parts/Game/GameLayer.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/parts/Game/GameLayer.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/Game/Option.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/parts/Game/Option.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/parts/GameEle.ts"
beforeDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/parts/Game/PlantList.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/parts/Game/PlantList.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/parts/MoveAni.ts"
beforeDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/scenes/GameScene.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/scenes/GameScene.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"
/>
...
@@ -40,7 +41,7 @@
...
@@ -40,7 +41,7 @@
<property
name=
"RunOnceActivity.OpenProjectViewOnStart"
value=
"true"
/>
<property
name=
"RunOnceActivity.OpenProjectViewOnStart"
value=
"true"
/>
<property
name=
"RunOnceActivity.ShowReadmeOnStart"
value=
"true"
/>
<property
name=
"RunOnceActivity.ShowReadmeOnStart"
value=
"true"
/>
<property
name=
"WebServerToolWindowFactoryState"
value=
"false"
/>
<property
name=
"WebServerToolWindowFactoryState"
value=
"false"
/>
<property
name=
"last_opened_file_path"
value=
"$PROJECT_DIR$/src/
panel
s"
/>
<property
name=
"last_opened_file_path"
value=
"$PROJECT_DIR$/src/
scene
s"
/>
<property
name=
"nodejs_interpreter_path.stuck_in_default_project"
value=
"undefined stuck path"
/>
<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_npm_path_reset_for_default_project"
value=
"true"
/>
<property
name=
"nodejs_package_manager_path"
value=
"npm"
/>
<property
name=
"nodejs_package_manager_path"
value=
"npm"
/>
...
@@ -49,6 +50,7 @@
...
@@ -49,6 +50,7 @@
</component>
</component>
<component
name=
"RecentsManager"
>
<component
name=
"RecentsManager"
>
<key
name=
"CopyFile.RECENT_KEYS"
>
<key
name=
"CopyFile.RECENT_KEYS"
>
<recent
name=
"$PROJECT_DIR$/src/scenes"
/>
<recent
name=
"$PROJECT_DIR$/src/panels"
/>
<recent
name=
"$PROJECT_DIR$/src/panels"
/>
</key>
</key>
</component>
</component>
...
@@ -85,9 +87,9 @@
...
@@ -85,9 +87,9 @@
</configuration>
</configuration>
<recent_temporary>
<recent_temporary>
<list>
<list>
<item
itemvalue=
"npm.dev"
/>
<item
itemvalue=
"npm.handleRes"
/>
<item
itemvalue=
"npm.handleRes"
/>
<item
itemvalue=
"npm.flushRes"
/>
<item
itemvalue=
"npm.flushRes"
/>
<item
itemvalue=
"npm.dev"
/>
</list>
</list>
</recent_temporary>
</recent_temporary>
</component>
</component>
...
@@ -103,7 +105,8 @@
...
@@ -103,7 +105,8 @@
<updated>
1590749938444
</updated>
<updated>
1590749938444
</updated>
<workItem
from=
"1590749939792"
duration=
"84000"
/>
<workItem
from=
"1590749939792"
duration=
"84000"
/>
<workItem
from=
"1590976087296"
duration=
"15316000"
/>
<workItem
from=
"1590976087296"
duration=
"15316000"
/>
<workItem
from=
"1590996860067"
duration=
"12763000"
/>
<workItem
from=
"1590996860067"
duration=
"14333000"
/>
<workItem
from=
"1591062735465"
duration=
"10090000"
/>
</task>
</task>
<task
id=
"LOCAL-00001"
summary=
"1"
>
<task
id=
"LOCAL-00001"
summary=
"1"
>
<created>
1591003912929
</created>
<created>
1591003912929
</created>
...
@@ -127,33 +130,39 @@
...
@@ -127,33 +130,39 @@
<screen
x=
"35"
y=
"23"
width=
"1645"
height=
"1027"
/>
<screen
x=
"35"
y=
"23"
width=
"1645"
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
width=
"2
55"
height=
"543"
key=
"GridCell.Tab.0.bottom"
timestamp=
"1591005691603
"
>
<state
width=
"2
95"
height=
"907"
key=
"GridCell.Tab.0.bottom"
timestamp=
"1591067986444
"
>
<screen
x=
"3
5"
y=
"23"
width=
"1645
"
height=
"1027"
/>
<screen
x=
"3
7"
y=
"23"
width=
"1643
"
height=
"1027"
/>
</state>
</state>
<state
width=
"255"
height=
"543"
key=
"GridCell.Tab.0.bottom/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027"
timestamp=
"1591005691603"
/>
<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=
"255"
height=
"543"
key=
"GridCell.Tab.0.center"
timestamp=
"1591005691600"
>
<state
width=
"295"
height=
"907"
key=
"GridCell.Tab.0.bottom/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027"
timestamp=
"1591067986444"
/>
<screen
x=
"35"
y=
"23"
width=
"1645"
height=
"1027"
/>
<state
width=
"295"
height=
"907"
key=
"GridCell.Tab.0.center"
timestamp=
"1591067986444"
>
<screen
x=
"37"
y=
"23"
width=
"1643"
height=
"1027"
/>
</state>
</state>
<state
width=
"255"
height=
"543"
key=
"GridCell.Tab.0.center/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027"
timestamp=
"1591005691600"
/>
<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=
"255"
height=
"543"
key=
"GridCell.Tab.0.left"
timestamp=
"1591005691596"
>
<state
width=
"295"
height=
"907"
key=
"GridCell.Tab.0.center/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027"
timestamp=
"1591067986444"
/>
<screen
x=
"35"
y=
"23"
width=
"1645"
height=
"1027"
/>
<state
width=
"295"
height=
"907"
key=
"GridCell.Tab.0.left"
timestamp=
"1591067986440"
>
<screen
x=
"37"
y=
"23"
width=
"1643"
height=
"1027"
/>
</state>
</state>
<state
width=
"255"
height=
"543"
key=
"GridCell.Tab.0.left/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027"
timestamp=
"1591005691596"
/>
<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=
"255"
height=
"543"
key=
"GridCell.Tab.0.right"
timestamp=
"1591005691603"
>
<state
width=
"295"
height=
"907"
key=
"GridCell.Tab.0.left/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027"
timestamp=
"1591067986440"
/>
<screen
x=
"35"
y=
"23"
width=
"1645"
height=
"1027"
/>
<state
width=
"295"
height=
"907"
key=
"GridCell.Tab.0.right"
timestamp=
"1591067986444"
>
<screen
x=
"37"
y=
"23"
width=
"1643"
height=
"1027"
/>
</state>
</state>
<state
width=
"255"
height=
"543"
key=
"GridCell.Tab.0.right/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027"
timestamp=
"1591005691603"
/>
<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
x=
"614"
y=
"245"
key=
"RollbackChangesDialog"
timestamp=
"1590993046653"
>
<state
width=
"295"
height=
"907"
key=
"GridCell.Tab.0.right/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027"
timestamp=
"1591067986444"
/>
<screen
x=
"35"
y=
"23"
width=
"1645"
height=
"1027"
/>
<state
x=
"615"
y=
"245"
key=
"RollbackChangesDialog"
timestamp=
"1591077661188"
>
<screen
x=
"37"
y=
"23"
width=
"1643"
height=
"1027"
/>
</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=
"586"
y=
"314"
key=
"refactoring.ChangeSignatureDialog"
timestamp=
"1590980819551"
>
<state
x=
"586"
y=
"314"
key=
"refactoring.ChangeSignatureDialog"
timestamp=
"1590980819551"
>
<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=
"52
2"
y=
"250"
width=
"670"
height=
"676"
key=
"search.everywhere.popup"
timestamp=
"1591014302210
"
>
<state
x=
"52
3"
y=
"250"
width=
"670"
height=
"676"
key=
"search.everywhere.popup"
timestamp=
"1591070100242
"
>
<screen
x=
"3
5"
y=
"23"
width=
"1645
"
height=
"1027"
/>
<screen
x=
"3
7"
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=
"1591014302210"
/>
<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=
"523"
y=
"250"
width=
"670"
height=
"676"
key=
"search.everywhere.popup/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027"
timestamp=
"1591070100242"
/>
</component>
</component>
</project>
</project>
\ No newline at end of file
released/resource/gameScene/gameScene.json
View file @
c95af6bd
{
{
"btn_浠撳簱.png"
:
{
"btn_浠撳簱.png"
:
{
"x"
:
1964
,
"x"
:
312
,
"y"
:
2
,
"y"
:
407
,
"w"
:
121
,
"w"
:
121
,
"h"
:
133
,
"h"
:
133
,
"ox"
:
0
,
"ox"
:
0
,
...
@@ -11,8 +11,8 @@
...
@@ -11,8 +11,8 @@
"ro"
:
false
"ro"
:
false
},
},
"btn_鍏戞崲璁板綍.png"
:
{
"btn_鍏戞崲璁板綍.png"
:
{
"x"
:
2960
,
"x"
:
413
,
"y"
:
2
,
"y"
:
710
,
"w"
:
100
,
"w"
:
100
,
"h"
:
104
,
"h"
:
104
,
"ox"
:
0
,
"ox"
:
0
,
...
@@ -22,8 +22,8 @@
...
@@ -22,8 +22,8 @@
"ro"
:
false
"ro"
:
false
},
},
"btn_鍟嗗簵.png"
:
{
"btn_鍟嗗簵.png"
:
{
"x"
:
2208
,
"x"
:
433
,
"y"
:
2
,
"y"
:
54
2
,
"w"
:
119
,
"w"
:
119
,
"h"
:
133
,
"h"
:
133
,
"ox"
:
0
,
"ox"
:
0
,
...
@@ -33,8 +33,8 @@
...
@@ -33,8 +33,8 @@
"ro"
:
false
"ro"
:
false
},
},
"btn_瑙勫垯.png"
:
{
"btn_瑙勫垯.png"
:
{
"x"
:
2765
,
"x"
:
312
,
"y"
:
2
,
"y"
:
710
,
"w"
:
99
,
"w"
:
99
,
"h"
:
107
,
"h"
:
107
,
"ox"
:
0
,
"ox"
:
0
,
...
@@ -44,8 +44,8 @@
...
@@ -44,8 +44,8 @@
"ro"
:
false
"ro"
:
false
},
},
"btn_棰嗘按婊�.png"
:
{
"btn_棰嗘按婊�.png"
:
{
"x"
:
2087
,
"x"
:
312
,
"y"
:
2
,
"y"
:
54
2
,
"w"
:
119
,
"w"
:
119
,
"h"
:
133
,
"h"
:
133
,
"ox"
:
0
,
"ox"
:
0
,
...
@@ -55,19 +55,19 @@
...
@@ -55,19 +55,19 @@
"ro"
:
false
"ro"
:
false
},
},
"game_get.png"
:
{
"game_get.png"
:
{
"x"
:
3246
,
"x"
:
470
,
"y"
:
97
,
"y"
:
816
,
"w"
:
82
,
"w"
:
82
,
"h"
:
93
,
"h"
:
93
,
"ox"
:
0
,
"ox"
:
0
,
"oy"
:
0
,
"oy"
:
0
,
"sw"
:
82
,
"sw"
:
82
,
"sh"
:
93
,
"sh"
:
93
,
"ro"
:
tru
e
"ro"
:
fals
e
},
},
"game_plant.png"
:
{
"game_plant.png"
:
{
"x"
:
3
154
,
"x"
:
3
78
,
"y"
:
2
,
"y"
:
819
,
"w"
:
90
,
"w"
:
90
,
"h"
:
101
,
"h"
:
101
,
"ox"
:
0
,
"ox"
:
0
,
...
@@ -77,8 +77,8 @@
...
@@ -77,8 +77,8 @@
"ro"
:
false
"ro"
:
false
},
},
"game_water.png"
:
{
"game_water.png"
:
{
"x"
:
3062
,
"x"
:
286
,
"y"
:
2
,
"y"
:
843
,
"w"
:
90
,
"w"
:
90
,
"h"
:
101
,
"h"
:
101
,
"ox"
:
0
,
"ox"
:
0
,
...
@@ -88,8 +88,8 @@
...
@@ -88,8 +88,8 @@
"ro"
:
false
"ro"
:
false
},
},
"骞垮憡.png"
:
{
"骞垮憡.png"
:
{
"x"
:
18
28
,
"x"
:
18
1
,
"y"
:
2
,
"y"
:
843
,
"w"
:
103
,
"w"
:
103
,
"h"
:
156
,
"h"
:
156
,
"ox"
:
0
,
"ox"
:
0
,
...
@@ -99,19 +99,19 @@
...
@@ -99,19 +99,19 @@
"ro"
:
false
"ro"
:
false
},
},
"鐢ㄦ埛_bg.png"
:
{
"鐢ㄦ埛_bg.png"
:
{
"x"
:
2329
,
"x"
:
181
,
"y"
:
2
,
"y"
:
407
,
"w"
:
434
,
"w"
:
434
,
"h"
:
129
,
"h"
:
129
,
"ox"
:
0
,
"ox"
:
0
,
"oy"
:
0
,
"oy"
:
0
,
"sw"
:
434
,
"sw"
:
434
,
"sh"
:
129
,
"sh"
:
129
,
"ro"
:
fals
e
"ro"
:
tru
e
},
},
"鐢ㄦ埛_澶村儚.png"
:
{
"鐢ㄦ埛_澶村儚.png"
:
{
"x"
:
3
246
,
"x"
:
3
78
,
"y"
:
2
,
"y"
:
92
2
,
"w"
:
93
,
"w"
:
93
,
"h"
:
93
,
"h"
:
93
,
"ox"
:
0
,
"ox"
:
0
,
...
@@ -121,18 +121,18 @@
...
@@ -121,18 +121,18 @@
"ro"
:
false
"ro"
:
false
},
},
"鐢ㄦ埛_姘�.png"
:
{
"鐢ㄦ埛_姘�.png"
:
{
"x"
:
2
024
,
"x"
:
2
86
,
"y"
:
137
,
"y"
:
946
,
"w"
:
39
,
"w"
:
39
,
"h"
:
48
,
"h"
:
48
,
"ox"
:
0
,
"ox"
:
0
,
"oy"
:
0
,
"oy"
:
0
,
"sw"
:
39
,
"sw"
:
39
,
"sh"
:
48
,
"sh"
:
48
,
"ro"
:
tru
e
"ro"
:
fals
e
},
},
"鐢癬鍒濆.png"
:
{
"鐢癬鍒濆.png"
:
{
"x"
:
812
,
"x"
:
343
,
"y"
:
2
,
"y"
:
2
,
"w"
:
403
,
"w"
:
403
,
"h"
:
177
,
"h"
:
177
,
...
@@ -140,10 +140,10 @@
...
@@ -140,10 +140,10 @@
"oy"
:
0
,
"oy"
:
0
,
"sw"
:
403
,
"sw"
:
403
,
"sh"
:
177
,
"sh"
:
177
,
"ro"
:
fals
e
"ro"
:
tru
e
},
},
"鐢癬绉嶆.png"
:
{
"鐢癬绉嶆.png"
:
{
"x"
:
407
,
"x"
:
164
,
"y"
:
2
,
"y"
:
2
,
"w"
:
403
,
"w"
:
403
,
"h"
:
177
,
"h"
:
177
,
...
@@ -151,21 +151,21 @@
...
@@ -151,21 +151,21 @@
"oy"
:
0
,
"oy"
:
0
,
"sw"
:
403
,
"sw"
:
403
,
"sh"
:
177
,
"sh"
:
177
,
"ro"
:
fals
e
"ro"
:
tru
e
},
},
"鐢癬閫夋嫨.png"
:
{
"鐢癬閫夋嫨.png"
:
{
"x"
:
2
,
"x"
:
2
,
"y"
:
2
,
"y"
:
613
,
"w"
:
403
,
"w"
:
403
,
"h"
:
177
,
"h"
:
177
,
"ox"
:
0
,
"ox"
:
0
,
"oy"
:
0
,
"oy"
:
0
,
"sw"
:
403
,
"sw"
:
403
,
"sh"
:
177
,
"sh"
:
177
,
"ro"
:
fals
e
"ro"
:
tru
e
},
},
"绉嶆妗哶bg.png"
:
{
"绉嶆妗哶bg.png"
:
{
"x"
:
1217
,
"x"
:
2
,
"y"
:
2
,
"y"
:
2
,
"w"
:
609
,
"w"
:
609
,
"h"
:
160
,
"h"
:
160
,
...
@@ -173,11 +173,11 @@
...
@@ -173,11 +173,11 @@
"oy"
:
0
,
"oy"
:
0
,
"sw"
:
609
,
"sw"
:
609
,
"sh"
:
160
,
"sh"
:
160
,
"ro"
:
fals
e
"ro"
:
tru
e
},
},
"绉嶆妗哶left.png"
:
{
"绉嶆妗哶left.png"
:
{
"x"
:
1828
,
"x"
:
510
,
"y"
:
160
,
"y"
:
677
,
"w"
:
19
,
"w"
:
19
,
"h"
:
34
,
"h"
:
34
,
"ox"
:
0
,
"ox"
:
0
,
...
@@ -187,8 +187,8 @@
...
@@ -187,8 +187,8 @@
"ro"
:
true
"ro"
:
true
},
},
"绉嶆妗哶right.png"
:
{
"绉嶆妗哶right.png"
:
{
"x"
:
1864
,
"x"
:
435
,
"y"
:
160
,
"y"
:
516
,
"w"
:
18
,
"w"
:
18
,
"h"
:
34
,
"h"
:
34
,
"ox"
:
0
,
"ox"
:
0
,
...
@@ -198,30 +198,30 @@
...
@@ -198,30 +198,30 @@
"ro"
:
true
"ro"
:
true
},
},
"绉嶆妗哶灞辨牳妗�.png"
:
{
"绉嶆妗哶灞辨牳妗�.png"
:
{
"x"
:
2119
,
"x"
:
473
,
"y"
:
137
,
"y"
:
959
,
"w"
:
35
,
"w"
:
35
,
"h"
:
44
,
"h"
:
44
,
"ox"
:
0
,
"ox"
:
0
,
"oy"
:
0
,
"oy"
:
0
,
"sw"
:
35
,
"sw"
:
35
,
"sh"
:
44
,
"sh"
:
44
,
"ro"
:
tru
e
"ro"
:
fals
e
},
},
"绉嶆妗哶寮€蹇冩灉.png"
:
{
"绉嶆妗哶寮€蹇冩灉.png"
:
{
"x"
:
193
3
,
"x"
:
47
3
,
"y"
:
143
,
"y"
:
911
,
"w"
:
35
,
"w"
:
35
,
"h"
:
46
,
"h"
:
46
,
"ox"
:
0
,
"ox"
:
0
,
"oy"
:
0
,
"oy"
:
0
,
"sw"
:
35
,
"sw"
:
35
,
"sh"
:
46
,
"sh"
:
46
,
"ro"
:
tru
e
"ro"
:
fals
e
},
},
"绉嶆妗哶鏉挎牀.png"
:
{
"绉嶆妗哶鏉挎牀.png"
:
{
"x"
:
1981
,
"x"
:
327
,
"y"
:
137
,
"y"
:
974
,
"w"
:
42
,
"w"
:
42
,
"h"
:
41
,
"h"
:
41
,
"ox"
:
0
,
"ox"
:
0
,
...
@@ -231,30 +231,30 @@
...
@@ -231,30 +231,30 @@
"ro"
:
true
"ro"
:
true
},
},
"绉嶆妗哶鐡滃瓙.png"
:
{
"绉嶆妗哶鐡滃瓙.png"
:
{
"x"
:
2414
,
"x"
:
522
,
"y"
:
1
3
3
,
"y"
:
1
4
3
,
"w"
:
26
,
"w"
:
26
,
"h"
:
48
,
"h"
:
48
,
"ox"
:
0
,
"ox"
:
0
,
"oy"
:
0
,
"oy"
:
0
,
"sw"
:
26
,
"sw"
:
26
,
"sh"
:
48
,
"sh"
:
48
,
"ro"
:
tru
e
"ro"
:
fals
e
},
},
"绉嶆妗哶鑵版灉.png"
:
{
"绉嶆妗哶鑵版灉.png"
:
{
"x"
:
2074
,
"x"
:
510
,
"y"
:
137
,
"y"
:
911
,
"w"
:
38
,
"w"
:
38
,
"h"
:
43
,
"h"
:
43
,
"ox"
:
0
,
"ox"
:
0
,
"oy"
:
0
,
"oy"
:
0
,
"sw"
:
38
,
"sw"
:
38
,
"sh"
:
43
,
"sh"
:
43
,
"ro"
:
tru
e
"ro"
:
fals
e
},
},
"绉嶆妗哶鑺辩敓.png"
:
{
"绉嶆妗哶鑺辩敓.png"
:
{
"x"
:
2363
,
"x"
:
327
,
"y"
:
133
,
"y"
:
946
,
"w"
:
26
,
"w"
:
26
,
"h"
:
49
,
"h"
:
49
,
"ox"
:
0
,
"ox"
:
0
,
...
@@ -264,8 +264,8 @@
...
@@ -264,8 +264,8 @@
"ro"
:
true
"ro"
:
true
},
},
"绉嶆妗哶琚嬪瓙.png"
:
{
"绉嶆妗哶琚嬪瓙.png"
:
{
"x"
:
2866
,
"x"
:
435
,
"y"
:
2
,
"y"
:
407
,
"w"
:
107
,
"w"
:
107
,
"h"
:
92
,
"h"
:
92
,
"ox"
:
0
,
"ox"
:
0
,
...
@@ -275,8 +275,8 @@
...
@@ -275,8 +275,8 @@
"ro"
:
true
"ro"
:
true
},
},
"杩涘害_bg.png"
:
{
"杩涘害_bg.png"
:
{
"x"
:
2165
,
"x"
:
312
,
"y"
:
13
7
,
"y"
:
67
7
,
"w"
:
196
,
"w"
:
196
,
"h"
:
31
,
"h"
:
31
,
"ox"
:
0
,
"ox"
:
0
,
...
@@ -286,7 +286,7 @@
...
@@ -286,7 +286,7 @@
"ro"
:
false
"ro"
:
false
},
},
"杩涘害_fill.png"
:
{
"杩涘害_fill.png"
:
{
"x"
:
1933
,
"x"
:
522
,
"y"
:
2
,
"y"
:
2
,
"w"
:
139
,
"w"
:
139
,
"h"
:
29
,
"h"
:
29
,
...
...
released/resource/gameScene/gameScene.png
View replaced file @
02e2d983
View file @
c95af6bd
70.5 KB
|
W:
|
H:
75.2 KB
|
W:
|
H:
2-up
Swipe
Onion skin
released/resource/loadingScene/loadingScene.json
0 → 100644
View file @
c95af6bd
{
"loading_per_bg.png"
:
{
"x"
:
2
,
"y"
:
312
,
"w"
:
539
,
"h"
:
81
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
539
,
"sh"
:
81
,
"ro"
:
false
},
"loading_per_fill.png"
:
{
"x"
:
2
,
"y"
:
395
,
"w"
:
510
,
"h"
:
55
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
510
,
"sh"
:
55
,
"ro"
:
false
},
"loading_title.png"
:
{
"x"
:
2
,
"y"
:
2
,
"w"
:
444
,
"h"
:
304
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
444
,
"sh"
:
304
,
"ro"
:
false
},
"loading_缁冲瓙.png"
:
{
"x"
:
448
,
"y"
:
2
,
"w"
:
308
,
"h"
:
306
,
"ox"
:
0
,
"oy"
:
0
,
"sw"
:
308
,
"sh"
:
306
,
"ro"
:
true
}
}
\ No newline at end of file
released/resource/loadingScene/loadingScene.png
0 → 100644
View file @
c95af6bd
41.9 KB
released/resource/loadingScene/loading_bg.jpg
0 → 100644
View file @
c95af6bd
69.4 KB
released/resource/res.json
View file @
c95af6bd
...
@@ -10,6 +10,11 @@
...
@@ -10,6 +10,11 @@
"name"
:
"gameScene"
,
"name"
:
"gameScene"
,
"atlas"
:
"gameScene.json"
"atlas"
:
"gameScene.json"
},
},
{
"keys"
:
"loading_bg.jpg,loading_per_bg.png,loading_per_fill.png,loading_title.png,loading_绳子.png"
,
"name"
:
"loadingScene"
,
"atlas"
:
"loadingScene.json"
},
{
{
"keys"
:
"rule_bg.png"
,
"keys"
:
"rule_bg.png"
,
"name"
:
"rulePanel"
,
"name"
:
"rulePanel"
,
...
...
resource/loadingScene/loading_bg.jpg
0 → 100644
View file @
c95af6bd
524 KB
resource/loadingScene/loading_per_bg.png
0 → 100644
View file @
c95af6bd
9.48 KB
resource/loadingScene/loading_per_fill.png
0 → 100644
View file @
c95af6bd
7.74 KB
resource/loadingScene/loading_title.png
0 → 100644
View file @
c95af6bd
137 KB
resource/loadingScene/loading_绳子.png
0 → 100644
View file @
c95af6bd
2.1 KB
resource/res.json
View file @
c95af6bd
...
@@ -8,6 +8,10 @@
...
@@ -8,6 +8,10 @@
"keys"
:
"btn_仓库.png,btn_兑换记录.png,btn_商店.png,btn_规则.png,btn_领水滴.png,game_bg.jpg,game_get.png,game_plant.png,game_water.png,广告.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"
,
"keys"
:
"btn_仓库.png,btn_兑换记录.png,btn_商店.png,btn_规则.png,btn_领水滴.png,game_bg.jpg,game_get.png,game_plant.png,game_water.png,广告.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"
"name"
:
"gameScene"
},
},
{
"keys"
:
"loading_bg.jpg,loading_per_bg.png,loading_per_fill.png,loading_title.png,loading_绳子.png"
,
"name"
:
"loadingScene"
},
{
{
"keys"
:
"rule_bg.png"
,
"keys"
:
"rule_bg.png"
,
"name"
:
"rulePanel"
"name"
:
"rulePanel"
...
...
scripts/textureMerge.js
View file @
c95af6bd
var
fs
=
require
(
"fs"
);
var
fs
=
require
(
"fs"
);
var
exec
=
require
(
'child_process'
).
exec
;
var
exec
=
require
(
'child_process'
).
exec
;
var
iconv
=
require
(
'iconv-lite'
);
var
iconv
=
require
(
'iconv-lite'
);
...
@@ -24,8 +23,7 @@ files.forEach(function (file) {
...
@@ -24,8 +23,7 @@ files.forEach(function (file) {
//如果文件夹不存在
//如果文件夹不存在
if
(
!
fs
.
existsSync
(
outPath
+
file
))
{
if
(
!
fs
.
existsSync
(
outPath
+
file
))
{
fs
.
mkdirSync
(
outPath
+
file
);
fs
.
mkdirSync
(
outPath
+
file
);
}
}
else
{
else
{
//图集文件存在就删除
//图集文件存在就删除
if
(
fs
.
existsSync
(
outPath
+
file
+
"/"
+
file
+
".json"
))
{
if
(
fs
.
existsSync
(
outPath
+
file
+
"/"
+
file
+
".json"
))
{
del
(
outPath
+
file
+
"/"
+
file
+
".json"
)
del
(
outPath
+
file
+
"/"
+
file
+
".json"
)
...
@@ -84,7 +82,7 @@ function getTmCmd(src, outPath, name) {
...
@@ -84,7 +82,7 @@ function getTmCmd(src, outPath, name) {
'TexturePacker '
+
//基础指令
'TexturePacker '
+
//基础指令
src
+
//要合图集的文件夹路径
src
+
//要合图集的文件夹路径
' --format json'
+
//图集数据格式
' --format json'
+
//图集数据格式
' --max-size 4096
'
+
//最大尺寸
' --max-size 1024
'
+
//最大尺寸
' --allow-free-size'
+
//允许使用最小尺寸输出,webgl最好别设置,现在小程序只有canvas模式,所以用最小尺寸导出吧
' --allow-free-size'
+
//允许使用最小尺寸输出,webgl最好别设置,现在小程序只有canvas模式,所以用最小尺寸导出吧
' --shape-padding 2'
+
//图片间隔
' --shape-padding 2'
+
//图片间隔
' --border-padding 2'
+
//边界间隔
' --border-padding 2'
+
//边界间隔
...
...
src/Main.ts
View file @
c95af6bd
import
{
Tool
}
from
"./Tools"
;
import
{
layers
,
destroyLayers
}
from
"../module/views/layers"
;
import
{
layers
,
destroyLayers
}
from
"../module/views/layers"
;
import
{
RES
}
from
"../module/RES"
;
import
{
RES
}
from
"../module/RES"
;
import
{
changeScene
,
showWaiting
,
destroyAllCtrls
}
from
"../module/ctrls"
;
import
{
changeScene
,
destroyAllCtrls
}
from
"../module/ctrls"
;
import
{
ResJson
}
from
"./ResJson"
;
import
{
ResJson
}
from
"./ResJson"
;
import
{
destroyNetData
,
sendTbNet
,
TbNetName
}
from
"./TaoBaoNet"
;
import
{
destroyNetData
}
from
"./TaoBaoNet"
;
import
{
GameScene
}
from
"./scenes/Game
Scene"
;
import
{
LoadingScene
}
from
"./scenes/Loading
Scene"
;
/**
/**
* 全局事件,为了和小程序交互
* 全局事件,为了和小程序交互
...
@@ -76,11 +74,8 @@ export class Main {
...
@@ -76,11 +74,8 @@ export class Main {
// if (document.getElementById("__loading__")) document.getElementById("__loading__").style.display = "none";
// if (document.getElementById("__loading__")) document.getElementById("__loading__").style.display = "none";
//打开开始场景
//打开开始场景
// 请求规则
changeScene
(
LoadingScene
);
sendTbNet
(
TbNetName
.
rule
,
{},
()
=>
{
// changeScene(GameScene);
});
changeScene
(
GameScene
);
//测试
//测试
// sendTbNet(TbNetName.aaa, {}, (s, res) => {
// sendTbNet(TbNetName.aaa, {}, (s, res) => {
// console.log(res)
// console.log(res)
...
...
src/ResJson.ts
View file @
c95af6bd
...
@@ -8,6 +8,10 @@ export const ResJson = {
...
@@ -8,6 +8,10 @@ export const ResJson = {
"keys"
:
"btn_仓库.png,btn_兑换记录.png,btn_商店.png,btn_规则.png,btn_领水滴.png,game_bg.jpg,game_get.png,game_plant.png,game_water.png,广告.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"
,
"keys"
:
"btn_仓库.png,btn_兑换记录.png,btn_商店.png,btn_规则.png,btn_领水滴.png,game_bg.jpg,game_get.png,game_plant.png,game_water.png,广告.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"
"name"
:
"gameScene"
},
},
{
"keys"
:
"loading_bg.jpg,loading_per_bg.png,loading_per_fill.png,loading_title.png,loading_绳子.png"
,
"name"
:
"loadingScene"
},
{
{
"keys"
:
"rule_bg.png"
,
"keys"
:
"rule_bg.png"
,
"name"
:
"rulePanel"
"name"
:
"rulePanel"
...
...
src/TaoBaoNet.ts
View file @
c95af6bd
...
@@ -69,6 +69,7 @@ let fc;
...
@@ -69,6 +69,7 @@ let fc;
* @param netName
* @param netName
* @param parameter
* @param parameter
* @param callback
* @param callback
* @param hideMsg
*/
*/
export
function
sendTbNet
(
netName
:
TbNetName
,
parameter
:
any
,
callback
:
Function
,
hideMsg
:
boolean
=
false
)
{
export
function
sendTbNet
(
netName
:
TbNetName
,
parameter
:
any
,
callback
:
Function
,
hideMsg
:
boolean
=
false
)
{
//网络超时
//网络超时
...
@@ -89,6 +90,16 @@ export function sendTbNet(netName: TbNetName, parameter: any, callback: Function
...
@@ -89,6 +90,16 @@ export function sendTbNet(netName: TbNetName, parameter: any, callback: Function
if
(
!
hideMsg
&&
!
data
.
success
)
showToast
(
data
.
message
||
"网络异常"
)
if
(
!
hideMsg
&&
!
data
.
success
)
showToast
(
data
.
message
||
"网络异常"
)
//回调
//回调
callback
(
data
.
success
,
data
);
callback
(
data
.
success
,
data
);
// 打印一下
console
.
log
(
`%cNAME :
${
netName
}
\n`
+
`STATE :
${
data
.
success
}
\n`
+
`DATA : `
,
`
${
data
.
success
?
'color:green'
:
'color:red`'
}
`
,
data
);
},
()
=>
{
},
()
=>
{
});
});
return
;
return
;
...
...
src/parts/Game/GameLayer.ts
View file @
c95af6bd
import
Container
=
FYGE
.
Container
;
import
Container
=
FYGE
.
Container
;
import
{
Land
}
from
"./Land"
;
import
{
Land
}
from
"./Land"
;
import
PlantList
from
"./PlantList"
;
import
PlantList
from
"./PlantList"
;
import
FrameAni
=
FYGE
.
FrameAni
;
/**
/**
* GameLayer
* GameLayer
...
...
src/parts/Game/Option.ts
View file @
c95af6bd
...
@@ -29,8 +29,8 @@ export default class Option extends Sprite {
...
@@ -29,8 +29,8 @@ export default class Option extends Sprite {
.
call
(()
=>
{
.
call
(()
=>
{
const
_y
=
this
.
y
;
const
_y
=
this
.
y
;
Tween
.
get
(
this
,
{
loop
:
true
})
Tween
.
get
(
this
,
{
loop
:
true
})
.
to
({
y
:
_y
-
6
},
10
00
,
Ease
.
quadInOut
)
.
to
({
y
:
_y
-
6
},
8
00
,
Ease
.
quadInOut
)
.
to
({
y
:
_y
},
10
00
,
Ease
.
quadInOut
);
.
to
({
y
:
_y
},
8
00
,
Ease
.
quadInOut
);
});
});
}
}
...
...
src/parts/Game/PlantList.ts
View file @
c95af6bd
...
@@ -11,6 +11,7 @@ import { RES } from "../../../module/RES";
...
@@ -11,6 +11,7 @@ import { RES } from "../../../module/RES";
import
Tween
=
FYGE
.
Tween
;
import
Tween
=
FYGE
.
Tween
;
import
Ease
=
FYGE
.
Ease
;
import
Ease
=
FYGE
.
Ease
;
import
GameLayer
from
"./GameLayer"
;
import
GameLayer
from
"./GameLayer"
;
import
MouseEvent
=
FYGE
.
MouseEvent
;
export
default
class
PlantList
extends
Container
{
export
default
class
PlantList
extends
Container
{
...
@@ -145,7 +146,18 @@ class ListPlant extends Container implements IScrollListItem {
...
@@ -145,7 +146,18 @@ class ListPlant extends Container implements IScrollListItem {
this
.
img
=
this
.
addChild
(
new
Sprite
());
this
.
img
=
this
.
addChild
(
new
Sprite
());
this
.
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
()
=>
{
this
.
anchorX
=
this
.
width
/
2
;
this
.
anchorY
=
this
.
height
/
2
;
this
.
addEventListener
(
MouseEvent
.
MOUSE_DOWN
,
()
=>
{
Tween
.
get
(
this
).
to
({
scaleX
:
0.9
,
scaleY
:
0.9
},
150
,
Ease
.
quadInOut
);
});
this
.
addEventListener
(
MouseEvent
.
MOUSE_UP
,
()
=>
{
Tween
.
get
(
this
).
to
({
scaleX
:
1
,
scaleY
:
1
},
150
,
Ease
.
quadInOut
);
});
this
.
addEventListener
(
MouseEvent
.
CLICK
,
()
=>
{
const
bindId
=
GameLayer
.
ins
.
plantList
.
bindId
;
const
bindId
=
GameLayer
.
ins
.
plantList
.
bindId
;
console
.
log
(
`点到了:
${
this
.
key
}
${
s_PlantData
[
this
.
key
].
name
}
, 土地Id:
${
bindId
}
`
);
console
.
log
(
`点到了:
${
this
.
key
}
${
s_PlantData
[
this
.
key
].
name
}
, 土地Id:
${
bindId
}
`
);
});
});
...
...
src/scenes/GameScene.ts
View file @
c95af6bd
...
@@ -3,7 +3,6 @@ import { Tool } from "../Tools";
...
@@ -3,7 +3,6 @@ import { Tool } from "../Tools";
import
GameLayer
from
"../parts/Game/GameLayer"
;
import
GameLayer
from
"../parts/Game/GameLayer"
;
import
{
UILayer
}
from
"../parts/UI/UILayer"
;
import
{
UILayer
}
from
"../parts/UI/UILayer"
;
import
MouseEvent
=
FYGE
.
MouseEvent
;
import
MouseEvent
=
FYGE
.
MouseEvent
;
import
OptionPool
,
{
OPTION_TYPE
}
from
"../const/OptionPool"
;
import
{
Land
}
from
"../parts/Game/Land"
;
import
{
Land
}
from
"../parts/Game/Land"
;
export
class
GameScene
extends
Scene
{
export
class
GameScene
extends
Scene
{
...
@@ -19,6 +18,7 @@ export class GameScene extends Scene {
...
@@ -19,6 +18,7 @@ export class GameScene extends Scene {
private
uiLayer
:
UILayer
;
private
uiLayer
:
UILayer
;
initUi
()
{
initUi
()
{
// 背景图
this
.
addChild
(
Tool
.
getSprite
(
'game_bg.jpg'
))
this
.
addChild
(
Tool
.
getSprite
(
'game_bg.jpg'
))
.
addEventListener
(
MouseEvent
.
CLICK
,
()
=>
{
.
addEventListener
(
MouseEvent
.
CLICK
,
()
=>
{
console
.
log
(
'点击了BG'
);
console
.
log
(
'点击了BG'
);
...
...
src/scenes/LoadingScene.ts
0 → 100644
View file @
c95af6bd
import
{
Scene
}
from
"../../module/views/Scene"
;
import
{
Tool
}
from
"../Tools"
;
import
{
sendTbNet
,
TbNetName
}
from
"../TaoBaoNet"
;
import
Container
=
FYGE
.
Container
;
import
Sprite
=
FYGE
.
Sprite
;
import
Tween
=
FYGE
.
Tween
;
import
Ease
=
FYGE
.
Ease
;
import
{
getAdjustTopHeight
}
from
"../const/myLab"
;
import
Graphics
=
FYGE
.
Graphics
;
import
SceneCtrl
from
"../../module/ctrls/sceneCtrl"
;
import
{
GameScene
}
from
"./GameScene"
;
export
class
LoadingScene
extends
Scene
{
get
groupNames
()
{
return
[
'loadingScene'
];
}
private
top
:
Container
;
private
title
:
Sprite
;
private
progressBar
:
Container
;
private
progressMask
:
Graphics
;
private
progressFill
:
Sprite
;
initUi
()
{
this
.
addChild
(
Tool
.
getSprite
(
'loading_bg.jpg'
));
// title
this
.
top
=
this
.
addChild
(
new
Container
());
const
line
=
this
.
top
.
addChild
(
Tool
.
getSprite
(
'loading_绳子.png'
));
line
.
position
.
set
(
211
,
-
12
);
this
.
title
=
this
.
top
.
addChild
(
Tool
.
getSprite
(
'loading_title.png'
));
this
.
title
.
position
.
set
(
156
,
141
);
this
.
title
.
anchor
.
set
(
this
.
title
.
width
/
2
,
this
.
title
.
height
/
2
);
this
.
top
.
y
=
getAdjustTopHeight
(
this
.
top
,
0
);
// progressBar
this
.
progressBar
=
this
.
addChild
(
new
Container
());
this
.
progressBar
.
addChild
(
Tool
.
getSprite
(
'loading_per_bg.png'
));
this
.
progressBar
.
position
.
set
(
108
,
1291
);
// fill
this
.
progressFill
=
this
.
progressBar
.
addChild
(
Tool
.
getSprite
(
'loading_per_fill.png'
));
this
.
progressFill
.
position
.
set
(
-
500
,
10
);
// mask
this
.
progressMask
=
this
.
progressBar
.
addChild
(
new
Graphics
());
this
.
progressMask
.
drawCircle
(
38
,
38
,
28
);
this
.
progressMask
.
drawCircle
(
492
,
38
,
28
);
this
.
progressMask
.
drawRect
(
38
,
10
,
464
,
56
);
this
.
progressFill
.
mask
=
this
.
progressMask
;
}
start
()
{
super
.
start
();
// 请求规则
sendTbNet
(
TbNetName
.
rule
,
{},
()
=>
{
});
this
.
titleEffect
().
call
(()
=>
{
this
.
startLoading
().
call
(()
=>
{
SceneCtrl
.
instance
.
change
(
GameScene
);
});
});
}
private
startLoading
()
{
return
Tween
.
get
(
this
.
progressFill
)
.
to
({
x
:
10
},
2000
,
Ease
.
quadInOut
);
}
private
titleEffect
()
{
const
_y
=
this
.
top
.
y
;
return
Tween
.
get
(
this
.
top
)
.
set
({
y
:
_y
-
445
})
.
to
({
y
:
_y
},
300
,
Ease
.
quadOut
)
.
to
({
y
:
_y
-
12
},
50
,
Ease
.
quadIn
)
.
call
(()
=>
{
Tween
.
get
(
this
.
title
)
.
to
({
rotation
:
5
},
50
)
.
to
({
rotation
:
-
5
},
50
)
.
to
({
rotation
:
0
},
50
);
});
}
initEvents
()
{
super
.
initEvents
();
}
removeEvents
()
{
super
.
removeEvents
();
}
}
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