Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zjzy_client_game
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
王勇霞
zjzy_client_game
Commits
e161d0e3
Commit
e161d0e3
authored
Mar 09, 2023
by
qi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更改写法
parent
a6b8335c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
7 deletions
+4
-7
ResJson.ts
src/ResJson.ts
+1
-1
GameScene.ts
src/scenes/GameScene.ts
+3
-5
Role.ts
src/scenes/components/Role.ts
+0
-1
No files found.
src/ResJson.ts
View file @
e161d0e3
...
@@ -755,5 +755,5 @@ export const ResJson = {
...
@@ -755,5 +755,5 @@ export const ResJson = {
"name"
:
"svga"
"name"
:
"svga"
}
}
],
],
"path"
:
"https://yun.duiba.com.cn/db_games/activity/template/167837
3209
/resource/"
"path"
:
"https://yun.duiba.com.cn/db_games/activity/template/167837
6631
/resource/"
}
}
\ No newline at end of file
src/scenes/GameScene.ts
View file @
e161d0e3
...
@@ -95,19 +95,17 @@ export class GameScene extends Scene {
...
@@ -95,19 +95,17 @@ export class GameScene extends Scene {
// 添加指向的事件
// 添加指向的事件
this
.
left
.
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
()
=>
{
this
.
left
.
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
()
=>
{
let
item
=
this
.
_role
.
currentIndex
<
0
?
this
.
mapList
[
0
][
0
]
:
this
.
mapList
[
this
.
_role
.
currentIndex
][
0
]
let
item
=
this
.
_role
.
currentIndex
<
0
?
this
.
mapList
[
0
][
0
]
:
this
.
mapList
[
this
.
_role
.
currentIndex
][
0
]
let
stageHeight
=
this
.
stage
.
stageHeight
;
if
(
item
.
y
+
this
.
bgCon
.
y
-
200
>
0
&&
!
this
.
_role
.
isMove
&&
this
.
_role
.
currentIndex
%
2
==
0
){
if
(
item
.
y
+
this
.
bgCon
.
y
-
200
>
0
&&
!
this
.
_role
.
isMove
&&
this
.
_role
.
currentIndex
%
2
==
0
){
this
.
left
.
startAniRange
(
1
,
undefined
,
1
,
()
=>
{
this
.
left
.
startAniRange
(
1
,
undefined
,
1
,
()
=>
{
console
.
log
(
'this._role.currentIndex'
,
this
.
_role
.
currentIndex
)
console
.
log
(
'this._role.currentIndex'
,
this
.
_role
.
currentIndex
)
this
.
_role
.
leftMove
({
this
.
_role
.
leftMove
({
item
:
item
item
:
item
},
this
.
collectWordTx
.
bind
(
this
))
},
this
.
collectWordTx
.
bind
(
this
,
item
))
})
})
}
}
})
})
this
.
right
.
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
()
=>
{
this
.
right
.
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
()
=>
{
let
item
=
this
.
_role
.
currentIndex
<
0
?
this
.
mapList
[
0
][
0
]
:
this
.
mapList
[
this
.
_role
.
currentIndex
][
0
]
let
item
=
this
.
_role
.
currentIndex
<
0
?
this
.
mapList
[
0
][
0
]
:
this
.
mapList
[
this
.
_role
.
currentIndex
][
0
]
let
stageHeight
=
this
.
stage
.
stageHeight
;
if
(
item
.
y
+
this
.
bgCon
.
y
-
200
>
0
&&
!
this
.
_role
.
isMove
&&
this
.
_role
.
currentIndex
%
2
==
1
){
if
(
item
.
y
+
this
.
bgCon
.
y
-
200
>
0
&&
!
this
.
_role
.
isMove
&&
this
.
_role
.
currentIndex
%
2
==
1
){
this
.
right
.
startAniRange
(
1
,
undefined
,
1
,
()
=>
{
this
.
right
.
startAniRange
(
1
,
undefined
,
1
,
()
=>
{
console
.
log
(
'this._role.currentIndex'
,
this
.
_role
.
currentIndex
)
console
.
log
(
'this._role.currentIndex'
,
this
.
_role
.
currentIndex
)
...
@@ -115,7 +113,7 @@ export class GameScene extends Scene {
...
@@ -115,7 +113,7 @@ export class GameScene extends Scene {
console
.
log
(
"播放完成"
)
console
.
log
(
"播放完成"
)
this
.
_role
.
rightMove
({
this
.
_role
.
rightMove
({
item
:
item
item
:
item
},
this
.
collectWordTx
.
bind
(
this
))
},
this
.
collectWordTx
.
bind
(
this
,
item
))
})
})
}
}
})
})
...
@@ -244,7 +242,7 @@ export class GameScene extends Scene {
...
@@ -244,7 +242,7 @@ export class GameScene extends Scene {
y
:
item
.
y
y
:
item
.
y
},
{
},
{
item
:
item
item
:
item
},
this
.
collectWordTx
.
bind
(
this
))
},
this
.
collectWordTx
.
bind
(
this
,
item
))
}
}
}
}
...
...
src/scenes/components/Role.ts
View file @
e161d0e3
...
@@ -7,7 +7,6 @@ export default class Role extends FYGE.Container {
...
@@ -7,7 +7,6 @@ export default class Role extends FYGE.Container {
downSvga
;
downSvga
;
lightSvga
;
lightSvga
;
currentIndex
=
-
2
;
currentIndex
=
-
2
;
position
;
item
;
item
;
isMove
;
isMove
;
...
...
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