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
ea3c72a6
Commit
ea3c72a6
authored
Nov 23, 2022
by
王勇霞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
配置
parent
abf88f4b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
18 deletions
+6
-18
ResJson.ts
src/ResJson.ts
+1
-1
Game.ts
src/template/Game.ts
+5
-17
No files found.
src/ResJson.ts
View file @
ea3c72a6
...
...
@@ -826,5 +826,5 @@ export const ResJson = {
}
}
],
"path"
:
"https://yun.duiba.com.cn/db_games/activity/template/16691
03592
/resource/"
"path"
:
"https://yun.duiba.com.cn/db_games/activity/template/16691
85117
/resource/"
}
\ No newline at end of file
src/template/Game.ts
View file @
ea3c72a6
...
...
@@ -39,7 +39,6 @@ export class Game extends Scene {
isPause
:
boolean
=
true
;
tween1
:
FYGE
.
Tween
;
tween2
:
FYGE
.
Tween
;
isFinish
:
number
=
0
;
puzzleIndex
:
number
=
2
;
initUi
()
{
...
...
@@ -117,6 +116,7 @@ export class Game extends Scene {
// 新手引导
onEnterGuide
()
{
this
.
needGuide
=
false
;
GDispatcher
.
dispatchEvent
(
"startId"
);
this
.
guideUIRender
();
}
guideUIRender
()
{
...
...
@@ -187,14 +187,7 @@ export class Game extends Scene {
let
x
=
Math
.
floor
(
this
.
sortArr
[
0
]
%
2
)
*
302
;
let
y
=
Math
.
floor
(
this
.
sortArr
[
0
]
/
2
)
*
302
;
this
.
sortArr
.
splice
(
0
,
1
);
FYGE
.
Tween
.
get
(
this
.
textureList
[
i
])
.
to
({
x
:
x
,
y
:
y
},
1000
)
.
call
(()
=>
{
this
.
isFinish
++
;
if
(
this
.
isFinish
>=
4
)
{
GDispatcher
.
dispatchEvent
(
"finish"
);
}
});
FYGE
.
Tween
.
get
(
this
.
textureList
[
i
]).
to
({
x
:
x
,
y
:
y
},
1000
);
}
this
.
textureList
=
tempArr
;
}
...
...
@@ -313,14 +306,9 @@ export class Game extends Scene {
console
.
log
(
"游戏结束"
);
this
.
isPause
=
true
;
this
.
canMove
=
true
;
this
.
isFinish
=
0
;
this
.
startBtnHandle
(
true
);
if
(
this
.
correctNumber
>=
4
)
{
console
.
log
(
"win"
);
GDispatcher
.
dispatchEvent
(
"win"
);
}
else
{
console
.
log
(
"over"
);
GDispatcher
.
dispatchEvent
(
"over"
);
GDispatcher
.
dispatchEvent
(
"submit"
);
}
this
.
correctNumber
=
0
;
if
(
this
.
tween1
&&
this
.
tween2
)
{
...
...
@@ -336,11 +324,11 @@ export class Game extends Scene {
initEvents
()
{
super
.
initEvents
();
// GDispatcher.addEventListener("closeGame", this.closeGame
, this);
GDispatcher
.
addEventListener
(
"onAgain"
,
this
.
gameUIRender
,
this
);
}
removeEvents
()
{
super
.
removeEvents
();
// GDispatcher.removeEventListener("closeGame", this.closeGame
, this);
GDispatcher
.
removeEventListener
(
"onAgain"
,
this
.
gameUIRender
,
this
);
this
.
textureContanier
.
removeEventListener
(
FYGE
.
MouseEvent
.
MOUSE_DOWN
,
this
.
mouseDownEvent
,
...
...
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