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
58120f8c
Commit
58120f8c
authored
Jun 08, 2020
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
getEffect
parent
a0ad980b
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
59 additions
and
32 deletions
+59
-32
workspace.xml
.idea/workspace.xml
+26
-22
FYGE.d.ts
libs/FYGE.d.ts
+1
-1
GameLayer.ts
src/parts/Game/GameLayer.ts
+13
-4
UILayer.ts
src/parts/UI/UILayer.ts
+16
-3
GameScene.ts
src/scenes/GameScene.ts
+3
-2
No files found.
.idea/workspace.xml
View file @
58120f8c
...
@@ -3,13 +3,10 @@
...
@@ -3,13 +3,10 @@
<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$/released/resource/gameScene/game_bg.jpg"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/released/resource/gameScene/game_bg.jpg"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/libs/FYGE.d.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/libs/FYGE.d.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/released/resource/loadingScene/loading_bg.jpg"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/released/resource/loadingScene/loading_bg.jpg"
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$/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/ProgressBar.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/parts/Game/ProgressBar.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/parts/UI/UILayer.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/parts/UI/UILayer.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/parts/UI/UILayer.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/parts/UI/UILayer.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/scenes/GameScene.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/scenes/GameScene.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"
/>
...
@@ -119,7 +116,7 @@
...
@@ -119,7 +116,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=
"1
1563
000"
/>
<workItem
from=
"1591594488054"
duration=
"1
3317
000"
/>
</task>
</task>
<task
id=
"LOCAL-00001"
summary=
"1"
>
<task
id=
"LOCAL-00001"
summary=
"1"
>
<created>
1591003912929
</created>
<created>
1591003912929
</created>
...
@@ -275,7 +272,14 @@
...
@@ -275,7 +272,14 @@
<option
name=
"project"
value=
"LOCAL"
/>
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1591604179544
</updated>
<updated>
1591604179544
</updated>
</task>
</task>
<option
name=
"localTasksCounter"
value=
"23"
/>
<task
id=
"LOCAL-00023"
summary=
"1"
>
<created>
1591607106108
</created>
<option
name=
"number"
value=
"00023"
/>
<option
name=
"presentableId"
value=
"LOCAL-00023"
/>
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1591607106108
</updated>
</task>
<option
name=
"localTasksCounter"
value=
"24"
/>
<servers
/>
<servers
/>
</component>
</component>
<component
name=
"TypeScriptGeneratedFilesManager"
>
<component
name=
"TypeScriptGeneratedFilesManager"
>
...
@@ -293,7 +297,6 @@
...
@@ -293,7 +297,6 @@
</component>
</component>
<component
name=
"VcsManagerConfiguration"
>
<component
name=
"VcsManagerConfiguration"
>
<option
name=
"CHECK_NEW_TODO"
value=
"false"
/>
<option
name=
"CHECK_NEW_TODO"
value=
"false"
/>
<MESSAGE
value=
"1"
/>
<MESSAGE
value=
"11"
/>
<MESSAGE
value=
"11"
/>
<MESSAGE
value=
"111"
/>
<MESSAGE
value=
"111"
/>
<MESSAGE
value=
"task"
/>
<MESSAGE
value=
"task"
/>
...
@@ -305,43 +308,44 @@
...
@@ -305,43 +308,44 @@
<MESSAGE
value=
"ExchangePanel"
/>
<MESSAGE
value=
"ExchangePanel"
/>
<MESSAGE
value=
"重构了种子动画,节省了一点资源"
/>
<MESSAGE
value=
"重构了种子动画,节省了一点资源"
/>
<MESSAGE
value=
"重构了出生动画,节省了一些资源"
/>
<MESSAGE
value=
"重构了出生动画,节省了一些资源"
/>
<option
name=
"LAST_COMMIT_MESSAGE"
value=
"重构了出生动画,节省了一些资源"
/>
<MESSAGE
value=
"1"
/>
<option
name=
"LAST_COMMIT_MESSAGE"
value=
"1"
/>
</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=
"159160
4178482
"
>
<state
x=
"467"
y=
"108"
key=
"CommitChangelistDialog2"
timestamp=
"159160
7105467
"
>
<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=
"159160
4178482
"
/>
<state
x=
"467"
y=
"108"
key=
"CommitChangelistDialog2/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027"
timestamp=
"159160
7105467
"
/>
<state
width=
"293"
height=
"907"
key=
"GridCell.Tab.0.bottom"
timestamp=
"159160
4499037
"
>
<state
width=
"293"
height=
"907"
key=
"GridCell.Tab.0.bottom"
timestamp=
"159160
7653535
"
>
<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=
"159160
4499037
"
/>
<state
width=
"293"
height=
"907"
key=
"GridCell.Tab.0.bottom/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027"
timestamp=
"159160
7653535
"
/>
<state
width=
"293"
height=
"907"
key=
"GridCell.Tab.0.center"
timestamp=
"159160
4499034
"
>
<state
width=
"293"
height=
"907"
key=
"GridCell.Tab.0.center"
timestamp=
"159160
7653532
"
>
<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=
"159160
4499034
"
/>
<state
width=
"293"
height=
"907"
key=
"GridCell.Tab.0.center/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027"
timestamp=
"159160
7653532
"
/>
<state
width=
"293"
height=
"907"
key=
"GridCell.Tab.0.left"
timestamp=
"159160
4499033
"
>
<state
width=
"293"
height=
"907"
key=
"GridCell.Tab.0.left"
timestamp=
"159160
7653530
"
>
<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=
"159160
4499033
"
/>
<state
width=
"293"
height=
"907"
key=
"GridCell.Tab.0.left/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027"
timestamp=
"159160
7653530
"
/>
<state
width=
"293"
height=
"907"
key=
"GridCell.Tab.0.right"
timestamp=
"159160
4499035
"
>
<state
width=
"293"
height=
"907"
key=
"GridCell.Tab.0.right"
timestamp=
"159160
7653534
"
>
<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=
"159160
4499035
"
/>
<state
width=
"293"
height=
"907"
key=
"GridCell.Tab.0.right/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027"
timestamp=
"159160
7653534
"
/>
<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>
...
@@ -368,11 +372,11 @@
...
@@ -368,11 +372,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=
"1591604566804
"
>
<state
x=
"
2248"
y=
"61"
width=
"783"
height=
"775"
key=
"search.everywhere.popup"
timestamp=
"1591608455312
"
>
<screen
x=
"
37"
y=
"23"
width=
"1643"
height=
"102
7"
/>
<screen
x=
"
1680"
y=
"-199"
width=
"1920"
height=
"117
7"
/>
</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=
"1591
582557074
"
/>
<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=
"1591
608455312
"
/>
<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=
"1591604566804"
/>
<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=
"1591604566804"
/>
</component>
</component>
</project>
</project>
\ No newline at end of file
libs/FYGE.d.ts
View file @
58120f8c
...
@@ -7640,4 +7640,4 @@ export var Stats: (canvasId: any) => {
...
@@ -7640,4 +7640,4 @@ export var Stats: (canvasId: any) => {
update
:
()
=>
void
;
update
:
()
=>
void
;
}
}
}
}
declare
module
"fyge"
{
export
=
FYGE
;}
// declare module "fyge" {export = FYGE;}
\ No newline at end of file
src/parts/Game/GameLayer.ts
View file @
58120f8c
...
@@ -3,8 +3,11 @@ import { Land } from "./Land";
...
@@ -3,8 +3,11 @@ import { Land } from "./Land";
import
PlantList
from
"./PlantList"
;
import
PlantList
from
"./PlantList"
;
import
{
PLANT_STATE
,
PLANT_TYPE
,
s_PlantData
}
from
"../../const/staticData"
;
import
{
PLANT_STATE
,
PLANT_TYPE
,
s_PlantData
}
from
"../../const/staticData"
;
import
{
Tool
}
from
"../../Tools"
;
import
{
Tool
}
from
"../../Tools"
;
import
{
UILayer
}
from
"../UI/UILayer"
;
import
{
layers
}
from
"../../../module/views/layers"
;
import
{
layers
}
from
"../../../module/views/layers"
;
import
Tween
=
FYGE
.
Tween
;
import
Ease
=
FYGE
.
Ease
;
import
{
G_wareHouseEffect
}
from
"../UI/UILayer"
;
/**
/**
* GameLayer
* GameLayer
...
@@ -98,10 +101,16 @@ export default class GameLayer extends Container {
...
@@ -98,10 +101,16 @@ export default class GameLayer extends Container {
}
}
public
getEffect
(
type
:
PLANT_TYPE
,
id
:
number
)
{
public
getEffect
(
type
:
PLANT_TYPE
,
id
:
number
)
{
cons
t
getEffect
=
this
.
addChild
(
Tool
.
getSprite
(
`种植框_
${
s_PlantData
[
type
].
name
}
.png`
));
le
t
getEffect
=
this
.
addChild
(
Tool
.
getSprite
(
`种植框_
${
s_PlantData
[
type
].
name
}
.png`
));
getEffect
.
position
.
set
(
this
.
landList
[
id
-
1
].
x
+
185
,
this
.
landList
[
id
-
1
].
y
+
55
);
getEffect
.
position
.
set
(
this
.
landList
[
id
-
1
].
x
+
185
,
this
.
landList
[
id
-
1
].
y
+
55
);
let
x
=
375
;
let
_x
=
375
-
getEffect
.
width
/
2
;
let
y
=
layers
.
stageWidth
-
layers
.
stageOffsetY
;
let
_y
=
layers
.
stageHeight
-
layers
.
stageOffsetY
-
200
;
Tween
.
get
(
getEffect
)
.
to
({
x
:
_x
,
y
:
_y
},
1000
,
Ease
.
quadInOut
)
.
call
(()
=>
{
G_wareHouseEffect
();
});
}
}
public
initEvent
()
{
public
initEvent
()
{
...
...
src/parts/UI/UILayer.ts
View file @
58120f8c
...
@@ -8,7 +8,12 @@ import PanelCtrl from "../../../module/ctrls/panelCtrl";
...
@@ -8,7 +8,12 @@ import PanelCtrl from "../../../module/ctrls/panelCtrl";
import
TaskPanel
from
"../../panels/TaskPanel"
;
import
TaskPanel
from
"../../panels/TaskPanel"
;
import
WareHousePanel
from
"../../panels/WareHousePanel"
;
import
WareHousePanel
from
"../../panels/WareHousePanel"
;
import
ShopPanel
from
"../../panels/ShopPanel"
;
import
ShopPanel
from
"../../panels/ShopPanel"
;
import
ExRecordPanel
from
"../../panels/ExRecordPanel"
;
import
RulePanel
from
"../../panels/RulePanel"
;
import
Tween
=
FYGE
.
Tween
;
export
let
G_wareHouseEffect
=
()
=>
{
};
export
class
UILayer
extends
Container
{
export
class
UILayer
extends
Container
{
...
@@ -29,6 +34,13 @@ export class UILayer extends Container {
...
@@ -29,6 +34,13 @@ export class UILayer extends Container {
this
.
initUILayer
();
this
.
initUILayer
();
G_wareHouseEffect
=
()
=>
{
Tween
.
removeTweens
(
this
.
wareHouseBtn
);
Tween
.
get
(
this
.
wareHouseBtn
)
.
to
({
scaleX
:
1.1
,
scaleY
:
0.9
},
90
)
.
to
({
scaleX
:
0.9
,
scaleY
:
1.1
},
180
)
.
to
({
scaleX
:
1
,
scaleY
:
1
},
90
)
};
}
}
public
initEvents
()
{
public
initEvents
()
{
...
@@ -64,8 +76,8 @@ export class UILayer extends Container {
...
@@ -64,8 +76,8 @@ export class UILayer extends Container {
break
;
break
;
case
this
.
ruleBtn
:
case
this
.
ruleBtn
:
console
.
log
(
'点击了规则'
);
console
.
log
(
'点击了规则'
);
//
PanelCtrl.instance.show(RulePanel);
PanelCtrl
.
instance
.
show
(
RulePanel
);
PanelCtrl
.
instance
.
show
(
ExRecordPanel
);
//
PanelCtrl.instance.show(ExRecordPanel);
break
;
break
;
case
this
.
adBtn
:
case
this
.
adBtn
:
console
.
log
(
'点击了广告'
);
console
.
log
(
'点击了广告'
);
...
@@ -83,6 +95,7 @@ export class UILayer extends Container {
...
@@ -83,6 +95,7 @@ export class UILayer extends Container {
this
.
wareHouseBtn
=
bottomGroup
.
addChild
(
Tool
.
getSprite
(
'btn_仓库.png'
))
this
.
wareHouseBtn
=
bottomGroup
.
addChild
(
Tool
.
getSprite
(
'btn_仓库.png'
))
this
.
wareHouseBtn
.
x
=
750
/
2
-
this
.
wareHouseBtn
.
width
/
2
;
this
.
wareHouseBtn
.
x
=
750
/
2
-
this
.
wareHouseBtn
.
width
/
2
;
this
.
wareHouseBtn
.
name
=
'仓库'
;
this
.
wareHouseBtn
.
name
=
'仓库'
;
this
.
wareHouseBtn
.
anchor
.
set
(
this
.
wareHouseBtn
.
width
/
2
,
this
.
wareHouseBtn
.
height
/
2
);
this
.
storeBtn
=
bottomGroup
.
addChild
(
Tool
.
getSprite
(
'btn_商店.png'
))
this
.
storeBtn
=
bottomGroup
.
addChild
(
Tool
.
getSprite
(
'btn_商店.png'
))
this
.
storeBtn
.
x
=
750
/
6
*
5
-
this
.
storeBtn
.
width
/
2
;
this
.
storeBtn
.
x
=
750
/
6
*
5
-
this
.
storeBtn
.
width
/
2
;
...
...
src/scenes/GameScene.ts
View file @
58120f8c
...
@@ -29,12 +29,13 @@ export class GameScene extends Scene {
...
@@ -29,12 +29,13 @@ export class GameScene extends Scene {
Land
.
activeLand
&&
Land
.
activeLand
.
deactivate
();
Land
.
activeLand
&&
Land
.
activeLand
.
deactivate
();
});
});
// 游戏层
this
.
gameLayer
=
this
.
addChild
(
GameLayer
.
ins
);
// UI层
// UI层
this
.
uiLayer
=
this
.
addChild
(
new
UILayer
());
this
.
uiLayer
=
this
.
addChild
(
new
UILayer
());
// 游戏层
this
.
gameLayer
=
this
.
addChild
(
GameLayer
.
ins
);
}
}
start
()
{
start
()
{
...
...
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