Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
LuzhouLaojiaoSnake_250428
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
SparkProjects
LuzhouLaojiaoSnake_250428
Commits
30dfd9f7
Commit
30dfd9f7
authored
May 08, 2025
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
升级动画
parent
82c88c54
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
Game.ts
src/pages/GamePage/Game.ts
+5
-5
No files found.
src/pages/GamePage/Game.ts
View file @
30dfd9f7
...
@@ -11,7 +11,7 @@ import {Element} from "./Components/Element/Element.ts";
...
@@ -11,7 +11,7 @@ import {Element} from "./Components/Element/Element.ts";
import
{
Response
,
Body
}
from
"detect-collisions"
;
import
{
Response
,
Body
}
from
"detect-collisions"
;
import
gameStore
from
"@/store/gameStore.ts"
;
import
gameStore
from
"@/store/gameStore.ts"
;
import
{
ScoreBubble
}
from
"@/pages/GamePage/Components/ScoreBubble.ts"
;
import
{
ScoreBubble
}
from
"@/pages/GamePage/Components/ScoreBubble.ts"
;
import
{
reaction
}
from
"mobx"
;
import
{
IReactionDisposer
,
reaction
}
from
"mobx"
;
import
{
Ease
,
Tween
}
from
"@/pages/GamePage/tween"
;
import
{
Ease
,
Tween
}
from
"@/pages/GamePage/tween"
;
export
class
Game
extends
Container
{
export
class
Game
extends
Container
{
...
@@ -22,12 +22,13 @@ export class Game extends Container {
...
@@ -22,12 +22,13 @@ export class Game extends Container {
private
elementMgr
:
ElementMgr
;
private
elementMgr
:
ElementMgr
;
lvDisposer
:
IReactionDisposer
=
null
;
constructor
()
{
constructor
()
{
super
();
super
();
this
.
initUI
();
this
.
initUI
();
reaction
(
this
.
lvDisposer
=
reaction
(
()
=>
gameStore
.
gameInfo
.
level
,
()
=>
gameStore
.
gameInfo
.
level
,
(
level
)
=>
{
(
level
)
=>
{
if
(
level
==
0
)
return
;
if
(
level
==
0
)
return
;
...
@@ -37,7 +38,7 @@ export class Game extends Container {
...
@@ -37,7 +38,7 @@ export class Game extends Container {
sp
.
anchor
.
set
(
0.5
,
0.5
);
sp
.
anchor
.
set
(
0.5
,
0.5
);
sp
.
scale
.
set
(
0
,
0
);
sp
.
scale
.
set
(
0
,
0
);
Tween
.
get
(
sp
.
scale
)
Tween
.
get
(
sp
.
scale
)
.
to
({
x
:
1
,
y
:
1
},
222
,
Ease
.
backOut
)
.
to
({
x
:
1
,
y
:
1
},
444
,
Ease
.
backOut
)
.
wait
(
1500
)
.
wait
(
1500
)
.
call
(()
=>
{
.
call
(()
=>
{
sp
.
removeFromParent
();
sp
.
removeFromParent
();
...
@@ -125,8 +126,7 @@ export class Game extends Container {
...
@@ -125,8 +126,7 @@ export class Game extends Container {
}
}
destroy
()
{
destroy
()
{
this
.
lvDisposer
();
super
.
destroy
();
super
.
destroy
();
}
}
}
}
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