Commit 809f519d authored by haiyoucuv's avatar haiyoucuv

上传

parent 2b02b347
This diff is collapsed.
assets/Bundles/MainGame/png/Guide2.png

8.73 KB | W: | H:

assets/Bundles/MainGame/png/Guide2.png

5.07 KB | W: | H:

assets/Bundles/MainGame/png/Guide2.png
assets/Bundles/MainGame/png/Guide2.png
assets/Bundles/MainGame/png/Guide2.png
assets/Bundles/MainGame/png/Guide2.png
  • 2-up
  • Swipe
  • Onion skin
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "fe3910ac-97d8-481c-9627-601077b214ec",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "fe3910ac-97d8-481c-9627-601077b214ec@6c48a",
"displayName": "start",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "fe3910ac-97d8-481c-9627-601077b214ec",
"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": "fe3910ac-97d8-481c-9627-601077b214ec@f9941",
"displayName": "start",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 297,
"height": 58,
"rawWidth": 297,
"rawHeight": 58,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-148.5,
-29,
0,
148.5,
-29,
0,
-148.5,
29,
0,
148.5,
29,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
58,
297,
58,
0,
0,
297,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-148.5,
-29,
0
],
"maxPos": [
148.5,
29,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "fe3910ac-97d8-481c-9627-601077b214ec@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "fe3910ac-97d8-481c-9627-601077b214ec@6c48a"
}
}
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "9e1763c8-e82d-4301-801a-d738b026a7af",
"files": [],
"subMetas": {},
"userData": {}
}
{
"ver": "1.0.0",
"importer": "*",
"imported": true,
"uuid": "46343c99-7acb-4df4-9c35-3d9cab5e102e",
"files": [
".json",
".svga"
],
"subMetas": {},
"userData": {}
}
import { _decorator, Button, Label, Node, screen, UI, UITransform, Widget } from 'cc';
import { _decorator, Button, game, Label, Node, screen, UI, UITransform, Widget } from 'cc';
import Scene from "db://assets/Module/Scene";
import { MainGame } from "./MainGame/MainGame";
import { changeScene, showPanel } from "db://assets/Module/UIFast";
import store from "../store/store";
import { observer, render } from "../store/decorators";
import { _asyncThrottle } from "../Utils/Utils";
import { GuideScene } from "./GuideScene";
import GameMgr from "../GameMgr";
import RankPanel from "../Panels/RankPanel";
import { UIMgr } from "../../Module/UIMgr";
......@@ -67,7 +66,7 @@ export class HomeScene extends Scene {
clickRule = _asyncThrottle(async () => {
// showPanel(RulePanel);
changeScene(GuideGame);
changeScene(GuideGame, { from: "HomeScene" });
});
clickRank = _asyncThrottle(() => {
......
......@@ -150,11 +150,14 @@ export class GuideGame extends Scene {
isOver: boolean = false;
async gameOver() {
if (this.isOver) return;
this.isOver = true;
await sleep(1.5);
this.phyUpdate = false;
this.guideNode.show(4);
await GameMgr.ins.submit(this.score);
// await GameMgr.ins.submit(this.score);
}
......@@ -178,6 +181,11 @@ export class GuideGame extends Scene {
this.guideNode.guide3Next.once(Button.EventType.CLICK, () => {
this.phyUpdate = true;
this.guideNode.hide();
// this.scheduleOnce(() => {
// this.gameOver();
// }, 10);
resolve();
});
});
......@@ -253,11 +261,8 @@ export class GuideGame extends Scene {
const singular = z % 2 == 0;
const newGroup = instantiate(singular ? this.wallPrefab : this.wallPrefab2);
this.node.addChild(newGroup);
newGroup.setPosition(v3(0, 0, z));
newGroup.getComponent(Wall).resetGuide();
// newGroup.setPosition(v3(0, Math.random(), z));
return newGroup;
}
......@@ -331,20 +336,6 @@ export class GuideGame extends Scene {
}
checkFrame = 0;
propCFG = [
{
lastZ: 0,
create: false,
interval: 1111111,
funcName: "createLight",
},
{
lastZ: 0,
create: false,
interval: 1111111,
funcName: "createRing",
},
]
checkWall() {
this.checkFrame = 0;
......@@ -352,36 +343,16 @@ export class GuideGame extends Scene {
const pz = Math.round(pPos.z);
const index = this.wallArr[0].position.z - pz;
const propLen = this.propCFG.length;
let create = false;
for (let i = 0; i < propLen; i++) {
const { lastZ, interval } = this.propCFG[i];
const dz = lastZ - pz;
if (create) {
this.propCFG[i].lastZ = pz;
} else if (dz >= interval) {
create = true;
this.propCFG[i].create = true;
this.propCFG[i].lastZ = pz;
}
}
const createCount = index - 4;
for (let i = 0; i < createCount; i++) {
const wall = this.wallArr.shift();
wall.setPosition(0, Math.random(), this.wallArr[this.wallArr.length - 1].position.z - 1);
this.wallArr.push(wall);
const wallTs = wall.getComponent(Wall);
wallTs.resetGuide();
for (let i = 0; i < propLen; i++) {
const { funcName, create } = this.propCFG[i];
if (create) {
this.propCFG[i].create = false;
wallTs[funcName]();
break;
}
if (this.guideNode.guideIndex == 3) {
wallTs.resetDeath();
} else {
wallTs.resetGuide();
}
}
}
......@@ -390,7 +361,6 @@ export class GuideGame extends Scene {
this.score += ~~((addScore * 15) * this.scoreRadio);
if (this.score > 9999) {
this.score = 9999;
PhysicsSystem.instance.enable = false;
this.gameOver();
}
}
......
import { _decorator, Component, Node } from 'cc';
import { _decorator, Button, Component, Node } from 'cc';
const { ccclass, property } = _decorator;
......@@ -14,6 +14,9 @@ export class GuideNode extends Component {
@property(Node)
guide3Next: Node = null;
@property(Node)
guide4Next: Node = null;
guideIndex: 0 | 1 | 2 | 3 | 4 = 0;
get guideShow() {
......
......@@ -41,6 +41,12 @@ export class Wall extends Component {
this.bottom.setPosition(0, -this.dH / 2, 0);
}
resetDeath() {
this.dH = Math.random() * 3 + 0.5;
this.top.setPosition(0, this.dH / 2, 0);
this.bottom.setPosition(0, -this.dH / 2, 0);
}
light: Node = null;
createLight() {
......
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