Commit f37581b3 authored by 罗睿卓's avatar 罗睿卓

emrge

parent a360efc6
...@@ -233,12 +233,12 @@ export class MainGame extends Scene { ...@@ -233,12 +233,12 @@ export class MainGame extends Scene {
this.lengthTxt.string = `${energy}`; this.lengthTxt.string = `${energy}`;
this.killTxt.string = `${killNum}`; this.killTxt.string = `${killNum}`;
this.luckyNum.string = ${luckNum + gameStore.startInfo?.accumulateLuckNum || 0}`; this.luckyNum.string = ${luckNum + gameStore.startInfo?.accumulateLuckNum || 0}`;
let canShort = Math.floor((energy / 500000)) > this.isShort // let canShort = Math.floor((energy / 500000)) > this.isShort
if(canShort){ // if(canShort){
this.isShort +=1 // this.isShort +=1
const b64 = this.copyRenderTex(); // const b64 = this.copyRenderTex();
store.upLoadImg(b64) // store.upLoadImg(b64)
} // }
} }
...@@ -366,7 +366,12 @@ export class MainGame extends Scene { ...@@ -366,7 +366,12 @@ export class MainGame extends Scene {
update(dt: number) { update(dt: number) {
if (!this.isStart) return; 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 now = performance.now();
// let temp = 0; // let temp = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment