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
b35a62d8
Commit
b35a62d8
authored
May 06, 2018
by
Shawn Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asldjoasd
parent
48a42560
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
Controller.ts
fe/src/Controller.ts
+6
-5
GameScene.ts
fe/src/scenes/GameScene.ts
+3
-4
No files found.
fe/src/Controller.ts
View file @
b35a62d8
class
Controller
extends
egret
.
Sprite
{
private
myPosition
=
{}
public
constructor
()
{
public
constructor
(
isCatcher
)
{
super
();
this
.
init
()
this
.
init
(
isCatcher
)
}
private
control
=
new
egret
.
Bitmap
()
...
...
@@ -14,13 +14,14 @@ class Controller extends egret.Sprite {
private
right
=
new
egret
.
Shape
()
// 初始化(给开始按钮绑定点击事件)
private
init
()
{
private
init
(
isCatcher
)
{
this
.
panel
.
graphics
.
beginFill
(
0x
353E5D
,
1
)
this
.
panel
.
graphics
.
beginFill
(
0x
00ff00
,
1
)
this
.
panel
.
graphics
.
drawRect
(
1008
,
0
,
326
,
750
)
this
.
panel
.
graphics
.
endFill
()
this
.
addChild
(
this
.
panel
)
if
(
!
isCatcher
){
let
texture
:
egret
.
Texture
=
RES
.
getRes
(
"control_jpg"
)
this
.
control
.
texture
=
texture
...
...
@@ -29,7 +30,6 @@ class Controller extends egret.Sprite {
controlContainer
.
x
=
1040
controlContainer
.
y
=
450
controlContainer
.
addChild
(
this
.
control
)
this
.
up
.
graphics
.
beginFill
(
0xFF00FF
,
1
)
this
.
up
.
graphics
.
drawRect
(
93
,
0
,
80
,
80
)
this
.
up
.
graphics
.
endFill
()
...
...
@@ -62,6 +62,7 @@ class Controller extends egret.Sprite {
controlContainer
.
addChild
(
this
.
down
)
controlContainer
.
addChild
(
this
.
left
)
controlContainer
.
addChild
(
this
.
right
)
}
const
me
=
Store
.
getState
().
runners
.
find
(
runner
=>
runner
.
t_cid
===
Store
.
getState
().
cid
)
...
...
fe/src/scenes/GameScene.ts
View file @
b35a62d8
...
...
@@ -16,11 +16,10 @@ class GameScene extends egret.Sprite {
bg
.
graphics
.
drawRect
(
0
,
0
,
1334
,
750
)
bg
.
graphics
.
endFill
()
this
.
addChild
(
bg
)
if
(
!
Store
.
isCatcher
())
{
this
.
controller
=
new
Controller
()
//
if (!Store.isCatcher()) {
this
.
controller
=
new
Controller
(
Store
.
isCatcher
()
)
this
.
addChild
(
this
.
controller
)
}
// }
this
.
map
=
new
Map
()
this
.
map
.
y
=
15
this
.
map
.
x
=
10
...
...
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