Commit 1b348f85 authored by haiyoucuv's avatar haiyoucuv

整理代码1

parent 6ed60f3e
......@@ -132,6 +132,7 @@ export class MainGame extends Scene {
}
clickBack = () => {
if (this.isOver) return;
changeScene(HomeScene);
}
......@@ -143,6 +144,8 @@ export class MainGame extends Scene {
* 点击万能球
*/
clickProtean = () => {
if (this.isOver) return;
if (this.proteanCount <= 0) {
showToast("万能球不足");
return;
......@@ -379,6 +382,8 @@ export class MainGame extends Scene {
readyDrop: boolean = false;
onTouchStart = (e: EventTouch) => {
if (this.isOver) return;
if (!this.newBall) {
return;
}
......@@ -389,6 +394,8 @@ export class MainGame extends Scene {
};
onTouchMove = (e: EventTouch) => {
if (this.isOver) return;
if (!this.newBall) {
return;
}
......@@ -399,6 +406,8 @@ export class MainGame extends Scene {
};
onTouchEC = (e: EventTouch) => {
if (this.isOver) return;
if (!this.newBall || !this.readyDrop) {
return;
}
......
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