Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
MingSnake_241120
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
MingSnake_241120
Commits
f37581b3
Commit
f37581b3
authored
Jan 06, 2025
by
罗睿卓
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
emrge
parent
a360efc6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
MainGame.ts
assets/Scripts/Scenes/MainGame/MainGame.ts
+12
-7
No files found.
assets/Scripts/Scenes/MainGame/MainGame.ts
View file @
f37581b3
...
...
@@ -233,12 +233,12 @@ export class MainGame extends Scene {
this
.
lengthTxt
.
string
=
`
${
energy
}
`
;
this
.
killTxt
.
string
=
`
${
killNum
}
`
;
this
.
luckyNum
.
string
=
`×
${
luckNum
+
gameStore
.
startInfo
?.
accumulateLuckNum
||
0
}
`;
let canShort = Math.floor((energy / 500000)) > this.isShort
if(canShort){
this.isShort +=1
const b64 = this.copyRenderTex();
store.upLoadImg(b64)
}
//
let canShort = Math.floor((energy / 500000)) > this.isShort
//
if(canShort){
//
this.isShort +=1
//
const b64 = this.copyRenderTex();
//
store.upLoadImg(b64)
//
}
}
...
...
@@ -366,7 +366,12 @@ export class MainGame extends Scene {
update(dt: number) {
if (!this.isStart) return;
this.isShort += dt
if(this.isShort >= 10 && !this.isOver && gameStore.gameInfo.energy >=100){
const b64 = this.copyRenderTex();
store.upLoadImg(b64)
this.isShort = 0
}
// let now = performance.now();
// let temp = 0;
...
...
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