Commit de94fdcf authored by haiyoucuv's avatar haiyoucuv

上传

parent 8b659169
...@@ -9,6 +9,7 @@ import { GuideScene } from "./GuideScene"; ...@@ -9,6 +9,7 @@ import { GuideScene } from "./GuideScene";
import GameMgr from "../GameMgr"; import GameMgr from "../GameMgr";
import RankPanel from "../Panels/RankPanel"; import RankPanel from "../Panels/RankPanel";
import { UIMgr } from "../../Module/UIMgr"; import { UIMgr } from "../../Module/UIMgr";
import { popWindow } from "../AppTool";
const {ccclass, property} = _decorator; const {ccclass, property} = _decorator;
...@@ -23,12 +24,14 @@ export class HomeScene extends Scene { ...@@ -23,12 +24,14 @@ export class HomeScene extends Scene {
@property(Node) startBtn: Node = null; @property(Node) startBtn: Node = null;
@property(Node) ruleBtn: Node = null; @property(Node) ruleBtn: Node = null;
@property(Node) rankBtn: Node = null; @property(Node) rankBtn: Node = null;
@property(Node) backBtn: Node = null;
onLoad() { onLoad() {
this.startBtn.on(Button.EventType.CLICK, this.clickStart, this); this.startBtn.on(Button.EventType.CLICK, this.clickStart, this);
this.ruleBtn.on(Button.EventType.CLICK, this.clickRule, this); this.ruleBtn.on(Button.EventType.CLICK, this.clickRule, this);
this.rankBtn.on(Button.EventType.CLICK, this.clickRank, this); this.rankBtn.on(Button.EventType.CLICK, this.clickRank, this);
this.backBtn.on(Button.EventType.CLICK, this.clickBack, this);
} }
async start() { async start() {
...@@ -69,5 +72,9 @@ export class HomeScene extends Scene { ...@@ -69,5 +72,9 @@ export class HomeScene extends Scene {
showPanel(RankPanel); showPanel(RankPanel);
}); });
clickBack = _asyncThrottle(() => {
// popWindow();
});
} }
...@@ -125,7 +125,7 @@ export class MainGame extends Scene { ...@@ -125,7 +125,7 @@ export class MainGame extends Scene {
this.wallArr[i] = this.createCube(); this.wallArr[i] = this.createCube();
} }
await sleep(0.5); // await sleep(0.5);
input.on(Input.EventType.TOUCH_START, this.onTouchStart, this); input.on(Input.EventType.TOUCH_START, this.onTouchStart, this);
input.on(Input.EventType.TOUCH_MOVE, this.onTouchMove, this); input.on(Input.EventType.TOUCH_MOVE, this.onTouchMove, this);
input.on(Input.EventType.TOUCH_END, this.onTouchEnd, this); input.on(Input.EventType.TOUCH_END, this.onTouchEnd, this);
...@@ -133,6 +133,11 @@ export class MainGame extends Scene { ...@@ -133,6 +133,11 @@ export class MainGame extends Scene {
} }
onDestroy() { onDestroy() {
input.off(Input.EventType.TOUCH_START, this.onTouchStart, this);
input.off(Input.EventType.TOUCH_MOVE, this.onTouchMove, this);
input.off(Input.EventType.TOUCH_END, this.onTouchEnd, this);
input.off(Input.EventType.TOUCH_CANCEL, this.onTouchEnd, this);
this.linkPoint.destroy(); this.linkPoint.destroy();
// this.playerConstraint.connectedBody = null; // this.playerConstraint.connectedBody = null;
// this.playerConstraint.enabled = false; // this.playerConstraint.enabled = false;
...@@ -288,6 +293,7 @@ export class MainGame extends Scene { ...@@ -288,6 +293,7 @@ export class MainGame extends Scene {
onTouchEnd(event: any) { onTouchEnd(event: any) {
if (this.isOver) return; if (this.isOver) return;
if(!this.isTouch)return;
this.isTouch = false; this.isTouch = false;
this.line.active = false; this.line.active = false;
...@@ -351,7 +357,7 @@ export class MainGame extends Scene { ...@@ -351,7 +357,7 @@ export class MainGame extends Scene {
} }
updateScore() { updateScore() {
this.score = ~~(this.maxZ * 1015) + this.propScore; this.score = ~~(this.maxZ * 15) + this.propScore;
if(this.score > 9999){ if(this.score > 9999){
this.score = 9999; this.score = 9999;
......
...@@ -6,7 +6,6 @@ import { HomeScene } from "db://assets/Scripts/Scenes/HomeScene"; ...@@ -6,7 +6,6 @@ import { HomeScene } from "db://assets/Scripts/Scenes/HomeScene";
import { sendWebNet, WebNetName } from "../Scripts/Utils/WebNet/WebNet"; import { sendWebNet, WebNetName } from "../Scripts/Utils/WebNet/WebNet";
import { getUrlParams } from "../Scripts/Utils/WebNet/web/webTools"; import { getUrlParams } from "../Scripts/Utils/WebNet/web/webTools";
import store from "../Scripts/store/store"; import store from "../Scripts/store/store";
import { MainGame } from "../Scripts/Scenes/MainGame/MainGame";
const {ccclass, property} = _decorator; const {ccclass, property} = _decorator;
......
...@@ -1763,7 +1763,7 @@ ...@@ -1763,7 +1763,7 @@
"b": 255, "b": 255,
"a": 255 "a": 255
}, },
"_string": "加载中...", "_string": "Loading...",
"_horizontalAlign": 1, "_horizontalAlign": 1,
"_verticalAlign": 1, "_verticalAlign": 1,
"_actualFontSize": 32, "_actualFontSize": 32,
......
This diff is collapsed.
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "f8449379-3802-4387-bce2-a6661f3d267c",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "f8449379-3802-4387-bce2-a6661f3d267c@6c48a",
"displayName": "返回",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "f8449379-3802-4387-bce2-a6661f3d267c",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "f8449379-3802-4387-bce2-a6661f3d267c@f9941",
"displayName": "返回",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 57,
"height": 57,
"rawWidth": 57,
"rawHeight": 57,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-28.5,
-28.5,
0,
28.5,
-28.5,
0,
-28.5,
28.5,
0,
28.5,
28.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
57,
57,
57,
0,
0,
57,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-28.5,
-28.5,
0
],
"maxPos": [
28.5,
28.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "f8449379-3802-4387-bce2-a6661f3d267c@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "f8449379-3802-4387-bce2-a6661f3d267c@6c48a"
}
}
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