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
c51de7e9
Commit
c51de7e9
authored
Jun 08, 2020
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
getEffect
parent
dde7d71d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
48 additions
and
21 deletions
+48
-21
workspace.xml
.idea/workspace.xml
+28
-18
index.html
index.html
+1
-1
浇水动效.svga
resource/svga/浇水动效.svga
+0
-0
Tools.ts
src/Tools.ts
+3
-2
Land.ts
src/parts/Game/Land.ts
+14
-0
LoadingScene.ts
src/scenes/LoadingScene.ts
+2
-0
No files found.
.idea/workspace.xml
View file @
c51de7e9
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<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=
"getEffect"
>
<change
afterPath=
"$PROJECT_DIR$/resource/svga/浇水动效.svga"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
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$/index.html"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/index.html"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/Tools.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/Tools.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/scenes/LoadingScene.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/scenes/LoadingScene.ts"
afterDir=
"false"
/>
</list>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
<option
name=
"HIGHLIGHT_CONFLICTS"
value=
"true"
/>
...
...
@@ -31,7 +34,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/
gameScene
"
/>
<property
name=
"last_opened_file_path"
value=
"$PROJECT_DIR$/resource/
svga
"
/>
<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"
/>
...
...
@@ -40,11 +43,11 @@
</component>
<component
name=
"RecentsManager"
>
<key
name=
"CopyFile.RECENT_KEYS"
>
<recent
name=
"$PROJECT_DIR$/resource/svga"
/>
<recent
name=
"$PROJECT_DIR$/resource/gameScene"
/>
<recent
name=
"$PROJECT_DIR$/resource/exchangePanel"
/>
<recent
name=
"$PROJECT_DIR$/resource/exchange"
/>
<recent
name=
"$PROJECT_DIR$/resource/wareHouse"
/>
<recent
name=
"$PROJECT_DIR$/resource/shopPanel"
/>
</key>
<key
name=
"MoveFile.RECENT_KEYS"
>
<recent
name=
"$PROJECT_DIR$/resource/panel"
/>
...
...
@@ -114,7 +117,7 @@
<workItem
from=
"1591321317628"
duration=
"18063000"
/>
<workItem
from=
"1591438071338"
duration=
"597000"
/>
<workItem
from=
"1591581198126"
duration=
"7855000"
/>
<workItem
from=
"1591594488054"
duration=
"1
4053
000"
/>
<workItem
from=
"1591594488054"
duration=
"1
6845
000"
/>
</task>
<task
id=
"LOCAL-00001"
summary=
"1"
>
<created>
1591003912929
</created>
...
...
@@ -284,7 +287,14 @@
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1591608886296
</updated>
</task>
<option
name=
"localTasksCounter"
value=
"25"
/>
<task
id=
"LOCAL-00025"
summary=
"getEffect"
>
<created>
1591609610340
</created>
<option
name=
"number"
value=
"00025"
/>
<option
name=
"presentableId"
value=
"LOCAL-00025"
/>
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1591609610340
</updated>
</task>
<option
name=
"localTasksCounter"
value=
"26"
/>
<servers
/>
</component>
<component
name=
"TypeScriptGeneratedFilesManager"
>
...
...
@@ -322,36 +332,36 @@
<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=
"159160
8885741
"
>
<state
x=
"467"
y=
"108"
key=
"CommitChangelistDialog2"
timestamp=
"159160
9616568
"
>
<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=
"159160
8885741
"
/>
<state
width=
"29
3"
height=
"907"
key=
"GridCell.Tab.0.bottom"
timestamp=
"1591607653535
"
>
<state
x=
"467"
y=
"108"
key=
"CommitChangelistDialog2/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027"
timestamp=
"159160
9616568
"
/>
<state
width=
"29
0"
height=
"907"
key=
"GridCell.Tab.0.bottom"
timestamp=
"1591609624063
"
>
<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=
"29
3"
height=
"907"
key=
"GridCell.Tab.0.bottom/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027"
timestamp=
"1591607653535
"
/>
<state
width=
"29
3"
height=
"907"
key=
"GridCell.Tab.0.center"
timestamp=
"1591607653532
"
>
<state
width=
"29
0"
height=
"907"
key=
"GridCell.Tab.0.bottom/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027"
timestamp=
"1591609624063
"
/>
<state
width=
"29
0"
height=
"907"
key=
"GridCell.Tab.0.center"
timestamp=
"1591609624061
"
>
<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=
"29
3"
height=
"907"
key=
"GridCell.Tab.0.center/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027"
timestamp=
"1591607653532
"
/>
<state
width=
"29
3"
height=
"907"
key=
"GridCell.Tab.0.left"
timestamp=
"1591607653530
"
>
<state
width=
"29
0"
height=
"907"
key=
"GridCell.Tab.0.center/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027"
timestamp=
"1591609624061
"
/>
<state
width=
"29
0"
height=
"907"
key=
"GridCell.Tab.0.left"
timestamp=
"1591609624061
"
>
<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=
"29
3"
height=
"907"
key=
"GridCell.Tab.0.left/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027"
timestamp=
"1591607653530
"
/>
<state
width=
"29
3"
height=
"907"
key=
"GridCell.Tab.0.right"
timestamp=
"1591607653534
"
>
<state
width=
"29
0"
height=
"907"
key=
"GridCell.Tab.0.left/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027"
timestamp=
"1591609624061
"
/>
<state
width=
"29
0"
height=
"907"
key=
"GridCell.Tab.0.right"
timestamp=
"1591609624062
"
>
<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=
"29
3"
height=
"907"
key=
"GridCell.Tab.0.right/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027"
timestamp=
"1591607653534
"
/>
<state
width=
"29
0"
height=
"907"
key=
"GridCell.Tab.0.right/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027"
timestamp=
"1591609624062
"
/>
<state
x=
"446"
y=
"278"
key=
"IDE.errors.dialog"
timestamp=
"1591150813027"
>
<screen
x=
"37"
y=
"23"
width=
"1643"
height=
"1027"
/>
</state>
...
...
@@ -378,11 +388,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=
"15916
09038886
"
>
<state
x=
"523"
y=
"250"
width=
"670"
height=
"676"
key=
"search.everywhere.popup"
timestamp=
"15916
12057298
"
>
<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=
"1591608455312"
/>
<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=
"15916
09038886
"
/>
<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=
"15916
12057298
"
/>
</component>
</project>
\ No newline at end of file
index.html
View file @
c51de7e9
...
...
@@ -20,7 +20,7 @@
<!-- <script src="libs/p2.js"></script> -->
<!-- <script src="libs/fyge.min.js"></script>-->
<script
src=
"http://localhost:3001/FYGE.js"
></script>
<!-- <script src="libs/svgaParser.min.js"></script>--
>
<script
src=
"libs/svgaParser.min.js"
></script
>
<style>
html
,
body
{
...
...
resource/svga/浇水动效.svga
0 → 100644
View file @
c51de7e9
File added
src/Tools.ts
View file @
c51de7e9
import
{
RES
}
from
"../module/RES"
;
import
MovieClip
=
FYGE
.
MovieClip
;
export
class
Tool
{
public
static
getSprite
(
imageName
:
string
,
x
:
number
=
0
,
y
:
number
=
0
)
{
...
...
@@ -81,7 +82,7 @@ export class Tool {
public
static
getSvga
(
name
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
if
(
Tool
.
svgaCache
[
name
])
{
resolve
(
new
FYGE
.
MovieClip
(
Tool
.
svgaCache
[
name
]));
resolve
(
new
MovieClip
(
Tool
.
svgaCache
[
name
]));
return
;
}
...
...
@@ -89,7 +90,7 @@ export class Tool {
const
src
=
`../resource/svga/
${
name
}
.svga`
;
/// TODO 线上替换
SvgaParser
.
loadSvga
(
src
,
(
v
)
=>
{
Tool
.
svgaCache
[
name
]
=
v
;
// 做一个缓存
const
mv
=
new
FYGE
.
MovieClip
(
v
);
const
mv
=
new
MovieClip
(
v
);
resolve
(
mv
);
},
(
err
)
=>
{
reject
(
err
);
...
...
src/parts/Game/Land.ts
View file @
c51de7e9
...
...
@@ -9,6 +9,9 @@ import OptionEffect from "./Effects/OptionEffect";
import
{
OPTION_TYPE
,
PLANT_STATE
,
PLANT_TYPE
}
from
"../../const/staticData"
;
import
Plant
from
"./Plant"
;
import
ProgressBar
from
"./ProgressBar"
;
import
{
Tool
}
from
"../../Tools"
;
import
Event
=
FYGE
.
Event
;
import
MovieClip
=
FYGE
.
MovieClip
;
export
enum
LAND_STATE
{
DEFAULT
=
'default'
,
...
...
@@ -172,6 +175,17 @@ export class Land extends Container {
public
water
(
e
:
MouseEvent
)
{
e
.
stopPropagation
();
console
.
log
(
"浇水"
);
this
.
removeOption
();
Tool
.
getSvga
(
'浇水动效'
).
then
((
mv
:
MovieClip
)
=>
{
this
.
addChild
(
mv
);
mv
.
position
.
set
(
50
,
-
230
);
mv
.
addEventListener
(
Event
.
END_FRAME
,
()
=>
{
mv
.
stop
();
this
.
removeChild
(
mv
);
this
.
updatePlant
(
this
.
plant
.
state
+
1
);
});
mv
.
gotoAndPlay
(
0
,
true
);
});
}
/**
...
...
src/scenes/LoadingScene.ts
View file @
c51de7e9
...
...
@@ -38,6 +38,8 @@ export class LoadingScene extends Scene {
// RES.loadGroup('plants');
// RES.loadGroup('Cashew_0');
Tool
.
getSvga
(
'浇水动效'
);
// bg
this
.
addChild
(
Tool
.
getSprite
(
'loading_bg.jpg'
));
...
...
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