Commit 14d59e9a authored by haiyoucuv's avatar haiyoucuv

GuideLayer

parent d7b32edf
This diff is collapsed.
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "aaf76f25-7072-4e04-a683-2fb08a94db99",
"files": [
".jpg",
".json"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "aaf76f25-7072-4e04-a683-2fb08a94db99@6c48a",
"displayName": "guideBg",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "aaf76f25-7072-4e04-a683-2fb08a94db99",
"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": "aaf76f25-7072-4e04-a683-2fb08a94db99@f9941",
"displayName": "guideBg",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 750,
"height": 1624,
"rawWidth": 750,
"rawHeight": 1624,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-375,
-812,
0,
375,
-812,
0,
-375,
812,
0,
375,
812,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
1624,
750,
1624,
0,
0,
750,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-375,
-812,
0
],
"maxPos": [
375,
812,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "aaf76f25-7072-4e04-a683-2fb08a94db99@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": false,
"fixAlphaTransparencyArtifacts": false,
"redirect": "aaf76f25-7072-4e04-a683-2fb08a94db99@6c48a"
}
}
......@@ -8,8 +8,8 @@
],
"subMetas": {},
"userData": {
"maxWidth": 1024,
"maxHeight": 1024,
"maxWidth": 4096,
"maxHeight": 4096,
"padding": 2,
"allowRotation": true,
"forceSquared": false,
......@@ -19,11 +19,14 @@
"quality": 80,
"contourBleed": true,
"paddingBleed": true,
"filterUnused": true,
"removeTextureInBundle": true,
"removeImageInBundle": true,
"removeSpriteAtlasInBundle": true,
"compressSettings": {},
"filterUnused": false,
"removeTextureInBundle": false,
"removeImageInBundle": false,
"removeSpriteAtlasInBundle": false,
"compressSettings": {
"useCompressTexture": false,
"presetId": "default"
},
"textureSetting": {
"wrapModeS": "repeat",
"wrapModeT": "repeat",
......
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "4cfa3f88-d5ce-4513-b8f5-85eaa6c54c9b",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "4cfa3f88-d5ce-4513-b8f5-85eaa6c54c9b@6c48a",
"displayName": "guide1",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "4cfa3f88-d5ce-4513-b8f5-85eaa6c54c9b",
"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": "4cfa3f88-d5ce-4513-b8f5-85eaa6c54c9b@f9941",
"displayName": "guide1",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 586,
"height": 800,
"rawWidth": 586,
"rawHeight": 800,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-293,
-400,
0,
293,
-400,
0,
-293,
400,
0,
293,
400,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
800,
586,
800,
0,
0,
586,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-293,
-400,
0
],
"maxPos": [
293,
400,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "4cfa3f88-d5ce-4513-b8f5-85eaa6c54c9b@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "4cfa3f88-d5ce-4513-b8f5-85eaa6c54c9b@6c48a"
}
}
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "5c7dcf82-fd0d-4e3e-afd4-4a18d629b8b5",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "5c7dcf82-fd0d-4e3e-afd4-4a18d629b8b5@6c48a",
"displayName": "guide2",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "5c7dcf82-fd0d-4e3e-afd4-4a18d629b8b5",
"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": "5c7dcf82-fd0d-4e3e-afd4-4a18d629b8b5@f9941",
"displayName": "guide2",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 586,
"height": 425,
"rawWidth": 586,
"rawHeight": 425,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-293,
-212.5,
0,
293,
-212.5,
0,
-293,
212.5,
0,
293,
212.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
425,
586,
425,
0,
0,
586,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-293,
-212.5,
0
],
"maxPos": [
293,
212.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "5c7dcf82-fd0d-4e3e-afd4-4a18d629b8b5@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "5c7dcf82-fd0d-4e3e-afd4-4a18d629b8b5@6c48a"
}
}
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "492cb64e-628a-44b8-8451-e2fc74582b32",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "492cb64e-628a-44b8-8451-e2fc74582b32@6c48a",
"displayName": "guide2top",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "492cb64e-628a-44b8-8451-e2fc74582b32",
"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": "492cb64e-628a-44b8-8451-e2fc74582b32@f9941",
"displayName": "guide2top",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 113,
"height": 135,
"rawWidth": 113,
"rawHeight": 135,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-56.5,
-67.5,
0,
56.5,
-67.5,
0,
-56.5,
67.5,
0,
56.5,
67.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
135,
113,
135,
0,
0,
113,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-56.5,
-67.5,
0
],
"maxPos": [
56.5,
67.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "492cb64e-628a-44b8-8451-e2fc74582b32@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "492cb64e-628a-44b8-8451-e2fc74582b32@6c48a"
}
}
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "d7945295-84bf-452b-b55a-b23abd37aba8",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "d7945295-84bf-452b-b55a-b23abd37aba8@6c48a",
"displayName": "guide3",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "d7945295-84bf-452b-b55a-b23abd37aba8",
"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": "d7945295-84bf-452b-b55a-b23abd37aba8@f9941",
"displayName": "guide3",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 586,
"height": 743,
"rawWidth": 586,
"rawHeight": 743,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-293,
-371.5,
0,
293,
-371.5,
0,
-293,
371.5,
0,
293,
371.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
743,
586,
743,
0,
0,
586,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-293,
-371.5,
0
],
"maxPos": [
293,
371.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "d7945295-84bf-452b-b55a-b23abd37aba8@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "d7945295-84bf-452b-b55a-b23abd37aba8@6c48a"
}
}
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "8a2ad764-7ece-4169-8717-dcfb9c8136c4",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "8a2ad764-7ece-4169-8717-dcfb9c8136c4@6c48a",
"displayName": "guide4",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "8a2ad764-7ece-4169-8717-dcfb9c8136c4",
"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": "8a2ad764-7ece-4169-8717-dcfb9c8136c4@f9941",
"displayName": "guide4",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 750,
"height": 735,
"rawWidth": 750,
"rawHeight": 735,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-375,
-367.5,
0,
375,
-367.5,
0,
-375,
367.5,
0,
375,
367.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
735,
750,
735,
0,
0,
750,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-375,
-367.5,
0
],
"maxPos": [
375,
367.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "8a2ad764-7ece-4169-8717-dcfb9c8136c4@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "8a2ad764-7ece-4169-8717-dcfb9c8136c4@6c48a"
}
}
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "b168d244-ca25-4074-b3b6-2661790bc2c4",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "b168d244-ca25-4074-b3b6-2661790bc2c4@6c48a",
"displayName": "next",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "b168d244-ca25-4074-b3b6-2661790bc2c4",
"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": "b168d244-ca25-4074-b3b6-2661790bc2c4@f9941",
"displayName": "next",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 140,
"height": 58,
"rawWidth": 140,
"rawHeight": 58,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-70,
-29,
0,
70,
-29,
0,
-70,
29,
0,
70,
29,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
58,
140,
58,
0,
0,
140,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-70,
-29,
0
],
"maxPos": [
70,
29,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "b168d244-ca25-4074-b3b6-2661790bc2c4@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "b168d244-ca25-4074-b3b6-2661790bc2c4@6c48a"
}
}
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "f59fc2b4-36a3-4add-a52e-cd8ad10cfc7b",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "f59fc2b4-36a3-4add-a52e-cd8ad10cfc7b@6c48a",
"displayName": "start",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "f59fc2b4-36a3-4add-a52e-cd8ad10cfc7b",
"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": "f59fc2b4-36a3-4add-a52e-cd8ad10cfc7b@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": "f59fc2b4-36a3-4add-a52e-cd8ad10cfc7b@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "f59fc2b4-36a3-4add-a52e-cd8ad10cfc7b@6c48a"
}
}
......@@ -15,7 +15,10 @@ let mainColor = Color.clone(Color.WHITE);
export function randomManColor() {
const index = Math.floor(Math.random() * MainColor.length);
mainColor = MainColor.splice(index, 1, mainColor)[0];
console.log(MainColor);
return mainColor;
}
export enum PROP_TYPE {
LIGHT,
RING,
}
\ No newline at end of file
import { _decorator, Button, Component, Node } from 'cc';
const {ccclass, property} = _decorator;
@ccclass('GameLayer')
export class GameLayer extends Component {
@property({type: [Node]}) guideNode: Node[] = [];
@property({type: Node}) nextBtn: Node = null;
@property({type: Node}) startBtn: Node = null;
private _guideIndex = 0;
get guideIndex() {
return this._guideIndex;
}
set guideIndex(value: number) {
this._guideIndex = value;
this.guideNode.forEach((node, index) => {
node.active = index == value;
});
const isLastStep = value == this.guideNode.length - 1;
this.startBtn.active = isLastStep;
this.nextBtn.active = !isLastStep;
}
onLoad() {
this.nextBtn.on(Button.EventType.CLICK, this.clickNext, this);
this.startBtn.on(Button.EventType.CLICK, this.clickStart, this);
}
clickNext() {
this.guideIndex++;
}
clickStart() {
this.node.active = false;
this.node.destroy();
}
}
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "0131a74d-0814-4a7d-b111-541d9f7e4c38",
"files": [],
"subMetas": {},
"userData": {}
}
......@@ -43,6 +43,8 @@ export class MainGame extends Scene {
@property({type: Label, group: "UI"}) scoreLabel: Label = null;
@property({type: Node, group: "UI"}) guideLayer: Node = null;
_score: number = 0;
set score(value: number) {
......@@ -110,7 +112,7 @@ export class MainGame extends Scene {
if (otherCollider.node.name == "光幕") {
const color = randomManColor();
this.changeColor(color);
this.changeMainColor(color);
}
}
......@@ -140,7 +142,7 @@ export class MainGame extends Scene {
lightTween: Tween<any> = null;
lightColor: Color = null;
changeColor(color: Color) {
changeMainColor(color: Color) {
this.lightTween?.removeSelf();
this.lightTween = tween({radio: 0})
.to(1, {radio: 1}, {
......
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