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
9df7a1ee
Commit
9df7a1ee
authored
May 07, 2025
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
倒计时
parent
e726f685
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
GamePage.tsx
src/pages/GamePage/GamePage.tsx
+1
-5
gameStore.ts
src/store/gameStore.ts
+6
-1
No files found.
src/pages/GamePage/GamePage.tsx
View file @
9df7a1ee
...
@@ -16,10 +16,7 @@ import { Stats } from 'pixi-stats';
...
@@ -16,10 +16,7 @@ import { Stats } from 'pixi-stats';
import
{
System
}
from
'detect-collisions'
;
import
{
System
}
from
'detect-collisions'
;
import
gameStore
from
"@/store/gameStore.ts"
;
import
gameStore
from
"@/store/gameStore.ts"
;
import
{
prefixInteger
,
second2Date
}
from
"@/utils/utils.ts"
;
import
{
prefixInteger
}
from
"@/utils/utils.ts"
;
import
{
ModalCtrl
}
from
"@/core/ctrls/ModalCtrl.tsx"
;
import
SucPanel
from
"@/panels/SucPanel/SucPanel.tsx"
;
import
FailPanel
from
"@/panels/FailPanel/FailPanel.tsx"
;
export
const
collisionSys
:
System
=
new
System
();
export
const
collisionSys
:
System
=
new
System
();
const
DEBUG
=
true
;
const
DEBUG
=
true
;
...
@@ -64,7 +61,6 @@ class GamePage extends React.Component {
...
@@ -64,7 +61,6 @@ class GamePage extends React.Component {
this
.
startCd
();
this
.
startCd
();
// ModalCtrl.showModal(SucPanel);
}
}
startCd
=
()
=>
{
startCd
=
()
=>
{
...
...
src/store/gameStore.ts
View file @
9df7a1ee
...
@@ -6,6 +6,9 @@ import {AESEncrypt} from "@/utils/Crypto.ts";
...
@@ -6,6 +6,9 @@ import {AESEncrypt} from "@/utils/Crypto.ts";
import
{
PageCtrl
}
from
"@/core/ctrls/PageCtrl.tsx"
;
import
{
PageCtrl
}
from
"@/core/ctrls/PageCtrl.tsx"
;
import
HomePage
from
"@/pages/HomePage/HomePage.tsx"
;
import
HomePage
from
"@/pages/HomePage/HomePage.tsx"
;
import
{
GameConfig
}
from
"@/pages/GamePage/config/Config.ts"
;
import
{
GameConfig
}
from
"@/pages/GamePage/config/Config.ts"
;
import
FailPanel
from
"@/panels/FailPanel/FailPanel.tsx"
;
import
SucPanel
from
"@/panels/SucPanel/SucPanel.tsx"
;
import
{
ModalCtrl
}
from
"@/core/ctrls/ModalCtrl.tsx"
;
class
GameStore
{
class
GameStore
{
...
@@ -94,8 +97,10 @@ class GameStore {
...
@@ -94,8 +97,10 @@ class GameStore {
return
;
return
;
}
}
if
(
data
)
{
if
(
score
>
data
.
reachTargetScore
)
{
ModalCtrl
.
showModal
(
SucPanel
);
}
else
{
}
else
{
ModalCtrl
.
showModal
(
FailPanel
);
}
}
}
}
...
...
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