Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
crazyflirt
Project
Overview
Details
Activity
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
Shawn Wang
crazyflirt
Commits
83945f29
Commit
83945f29
authored
May 05, 2018
by
Shawn Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
666
parent
c6a417b5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
5 deletions
+14
-5
grid.jpg
fe/resource/assets/grid.jpg
+0
-0
grid_select.jpg
fe/resource/assets/grid_select.jpg
+0
-0
default.res.json
fe/resource/default.res.json
+7
-1
Guy.ts
fe/src/Guy.ts
+5
-4
GameScene.ts
fe/src/scenes/GameScene.ts
+2
-0
No files found.
fe/resource/assets/grid.jpg
View replaced file @
c6a417b5
View file @
83945f29
453 Bytes
|
W:
|
H:
333 Bytes
|
W:
|
H:
2-up
Swipe
Onion skin
fe/resource/assets/grid_select.jpg
0 → 100644
View file @
83945f29
331 Bytes
fe/resource/default.res.json
View file @
83945f29
{
{
"groups"
:
[
"groups"
:
[
{
{
"keys"
:
"bg_jpg,egret_icon_png,description_json,control_jpg,grid_jpg,logo_jpg,mask_jpg"
,
"keys"
:
"bg_jpg,egret_icon_png,description_json,control_jpg,grid_jpg,logo_jpg,mask_jpg
,grid_select_jpg
"
,
"name"
:
"preload"
"name"
:
"preload"
}
}
],
],
...
@@ -40,6 +40,11 @@
...
@@ -40,6 +40,11 @@
"name"
:
"mask_jpg"
,
"name"
:
"mask_jpg"
,
"type"
:
"image"
,
"type"
:
"image"
,
"url"
:
"assets/mask.jpg"
"url"
:
"assets/mask.jpg"
},
{
"name"
:
"grid_select_jpg"
,
"type"
:
"image"
,
"url"
:
"assets/grid_select.jpg"
}
}
]
]
}
}
\ No newline at end of file
fe/src/Guy.ts
View file @
83945f29
...
@@ -26,8 +26,8 @@ class Guy extends egret.Sprite {
...
@@ -26,8 +26,8 @@ class Guy extends egret.Sprite {
this
.
x
+=
this
.
step
*
delta
.
x
this
.
x
+=
this
.
step
*
delta
.
x
this
.
y
+=
this
.
step
*
delta
.
y
this
.
y
+=
this
.
step
*
delta
.
y
if
(
this
.
x
<=
0
){
if
(
this
.
x
<=
1
0
){
this
.
x
=
0
this
.
x
=
1
0
}
}
if
(
this
.
y
<=
15
){
if
(
this
.
y
<=
15
){
this
.
y
=
15
this
.
y
=
15
...
@@ -35,8 +35,8 @@ class Guy extends egret.Sprite {
...
@@ -35,8 +35,8 @@ class Guy extends egret.Sprite {
if
(
this
.
y
>=
72
*
9
+
15
){
if
(
this
.
y
>=
72
*
9
+
15
){
this
.
y
=
72
*
9
+
15
this
.
y
=
72
*
9
+
15
}
}
if
(
this
.
x
>=
72
*
13
){
if
(
this
.
x
>=
72
*
13
+
10
){
this
.
x
=
72
*
13
this
.
x
=
72
*
13
+
10
}
}
}
}
}
}
\ No newline at end of file
fe/src/scenes/GameScene.ts
View file @
83945f29
...
@@ -24,7 +24,9 @@ class GameScene extends egret.Sprite {
...
@@ -24,7 +24,9 @@ class GameScene extends egret.Sprite {
this
.
controller
.
addEventListener
(
"position_change"
,
this
.
onPositionChange
,
this
)
this
.
controller
.
addEventListener
(
"position_change"
,
this
.
onPositionChange
,
this
)
this
.
map
=
new
Map
()
this
.
map
=
new
Map
()
this
.
map
.
y
=
15
this
.
map
.
y
=
15
this
.
map
.
x
=
10
this
.
me
.
y
=
15
this
.
me
.
y
=
15
this
.
me
.
x
=
10
this
.
addChild
(
this
.
map
)
this
.
addChild
(
this
.
map
)
this
.
addChild
(
this
.
me
)
this
.
addChild
(
this
.
me
)
}
}
...
...
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