Commit 4d05e251 authored by unknown's avatar unknown

可以打包了

parent 2ff707b4
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "6a6cc219-c2f6-4bec-b9b0-0548f4c01d67",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}
{
"ver": "1.0.21",
"importer": "image",
"imported": true,
"uuid": "c7410db3-2fa3-4da3-a427-95e464338e78",
"files": [
".png",
".json"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "c7410db3-2fa3-4da3-a427-95e464338e78@6c48a",
"displayName": "按钮-游戏说明",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0,
"isUuid": true,
"imageUuidOrDatabaseUri": "c7410db3-2fa3-4da3-a427-95e464338e78"
},
"ver": "1.0.21",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "c7410db3-2fa3-4da3-a427-95e464338e78@f9941",
"displayName": "按钮-游戏说明",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 140,
"height": 60,
"rawWidth": 140,
"rawHeight": 60,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"isUuid": true,
"imageUuidOrDatabaseUri": "c7410db3-2fa3-4da3-a427-95e464338e78@6c48a",
"atlasUuid": ""
},
"ver": "1.0.9",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"hasAlpha": true,
"type": "sprite-frame",
"redirect": "c7410db3-2fa3-4da3-a427-95e464338e78@f9941"
}
}
{
"ver": "1.0.21",
"importer": "image",
"imported": true,
"uuid": "58a10871-3c1a-41f4-bcc2-7697b1145878",
"files": [
".png",
".json"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "58a10871-3c1a-41f4-bcc2-7697b1145878@6c48a",
"displayName": "游戏说明",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0,
"isUuid": true,
"imageUuidOrDatabaseUri": "58a10871-3c1a-41f4-bcc2-7697b1145878"
},
"ver": "1.0.21",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "58a10871-3c1a-41f4-bcc2-7697b1145878@f9941",
"displayName": "游戏说明",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1334,
"height": 750,
"rawWidth": 1334,
"rawHeight": 750,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"isUuid": true,
"imageUuidOrDatabaseUri": "58a10871-3c1a-41f4-bcc2-7697b1145878@6c48a",
"atlasUuid": ""
},
"ver": "1.0.9",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"hasAlpha": true,
"type": "sprite-frame",
"redirect": "58a10871-3c1a-41f4-bcc2-7697b1145878@f9941"
}
}
{
"ver": "1.0.21",
"importer": "image",
"imported": true,
"uuid": "6e606a8a-694f-4408-8e5b-70b9085214f9",
"files": [
".png",
".json"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "6e606a8a-694f-4408-8e5b-70b9085214f9@6c48a",
"displayName": "编组 129",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0,
"isUuid": true,
"imageUuidOrDatabaseUri": "6e606a8a-694f-4408-8e5b-70b9085214f9"
},
"ver": "1.0.21",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "6e606a8a-694f-4408-8e5b-70b9085214f9@f9941",
"displayName": "编组 129",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0.5,
"offsetY": 0,
"trimX": 31,
"trimY": 43,
"width": 931,
"height": 906,
"rawWidth": 992,
"rawHeight": 992,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"isUuid": true,
"imageUuidOrDatabaseUri": "6e606a8a-694f-4408-8e5b-70b9085214f9@6c48a",
"atlasUuid": ""
},
"ver": "1.0.9",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"hasAlpha": true,
"type": "sprite-frame",
"redirect": "6e606a8a-694f-4408-8e5b-70b9085214f9@f9941"
}
}
...@@ -270,7 +270,7 @@ ...@@ -270,7 +270,7 @@
"b": 255, "b": 255,
"a": 255 "a": 255
}, },
"_string": "这位员工的名字叫什么?", "_string": "这位同学的名字叫什么?",
"_horizontalAlign": 1, "_horizontalAlign": 1,
"_verticalAlign": 1, "_verticalAlign": 1,
"_actualFontSize": 40, "_actualFontSize": 40,
......
{
"ver": "1.1.27",
"importer": "prefab",
"imported": true,
"uuid": "71ce1a39-fb6b-48a4-9d8c-c93024e7d19c",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "FaceRgGameDescView"
}
}
...@@ -9,6 +9,8 @@ import { AudioSrc } from '../../commonView/script/AudioSrc'; ...@@ -9,6 +9,8 @@ import { AudioSrc } from '../../commonView/script/AudioSrc';
import { BeginCountdownView } from '../../commonView/script/BeginCountdownView'; import { BeginCountdownView } from '../../commonView/script/BeginCountdownView';
import { ChallengeFailView } from '../../commonView/script/ChallengeFailView'; import { ChallengeFailView } from '../../commonView/script/ChallengeFailView';
import { ChallengeSuccView } from '../../commonView/script/ChallengeSuccView'; import { ChallengeSuccView } from '../../commonView/script/ChallengeSuccView';
import { ScoreFailView } from '../../commonView/script/ScoreFailView';
import { ScoreSuccView } from '../../commonView/script/ScoreSuccView';
import { SwitchErrorView } from '../../commonView/script/SwitchErrorView'; import { SwitchErrorView } from '../../commonView/script/SwitchErrorView';
import { SwitchOkView } from '../../commonView/script/SwitchOkView'; import { SwitchOkView } from '../../commonView/script/SwitchOkView';
import { FaceRgAnswerOneView } from './FaceRgAnswerOneView'; import { FaceRgAnswerOneView } from './FaceRgAnswerOneView';
...@@ -74,15 +76,28 @@ export class FaceRecognitionCtr extends Component { ...@@ -74,15 +76,28 @@ export class FaceRecognitionCtr extends Component {
private isPlayCountdownMus = false; private isPlayCountdownMus = false;
private audioSrc: AudioSrc = null!; private audioSrc: AudioSrc = null!;
setGameData(resData: object){ private isShowGameDescViewOnce = false;
setGameData(resData: object) {
//@ts-ignore //@ts-ignore
if(resData.totalTime){ if (resData.totalTime) {
//@ts-ignore //@ts-ignore
this.totalTime = resData.totalTime; this.totalTime = resData.totalTime;
} }
} }
onCloseGameDescView() {
if (!this.isShowGameDescViewOnce) {
this.isShowGameDescViewOnce = true;
this.gameState = GAME_STATE.WATCH;
}
else {
}
}
start() { start() {
director.on("game_desc_close", this.onCloseGameDescView, this);
let outGameTime = Utils.getValueFromHref("gameTime"); let outGameTime = Utils.getValueFromHref("gameTime");
if (outGameTime !== null) { if (outGameTime !== null) {
this.totalTime = <number><any>outGameTime; this.totalTime = <number><any>outGameTime;
...@@ -140,13 +155,23 @@ export class FaceRecognitionCtr extends Component { ...@@ -140,13 +155,23 @@ export class FaceRecognitionCtr extends Component {
}); });
director.on("finish_game", () => { director.on("finish_game", () => {
});
director.on("begin_countdown_end", () => {
if (this.isShowGameDescViewOnce) {
this.gameState = GAME_STATE.WATCH;
}
else {
this.gameState = GAME_STATE.PAUSE;
viewMgr.openView(VIEW_DEF.FaceRgGameDescView);
}
}); });
this.startGame(); this.startGame();
} }
onDestroy(){ onDestroy() {
director.off("face_rg_anwser"); director.off("face_rg_anwser");
director.off("answer_one"); director.off("answer_one");
director.off("answer_two"); director.off("answer_two");
...@@ -168,9 +193,6 @@ export class FaceRecognitionCtr extends Component { ...@@ -168,9 +193,6 @@ export class FaceRecognitionCtr extends Component {
this.curScore = 0; this.curScore = 0;
this.curScoreLab.string = "我的" + this.curScore + "分"; this.curScoreLab.string = "我的" + this.curScore + "分";
this.succScoreLab.string = "通关≥" + this.succScore + "分"; this.succScoreLab.string = "通关≥" + this.succScore + "分";
director.on("begin_countdown_end", () => {
this.gameState = GAME_STATE.WATCH;
});
this.startRound(false); this.startRound(false);
viewMgr.openView(VIEW_DEF.BeginCountdownView, (node) => { viewMgr.openView(VIEW_DEF.BeginCountdownView, (node) => {
this.gameState = GAME_STATE.PAUSE; this.gameState = GAME_STATE.PAUSE;
...@@ -178,6 +200,10 @@ export class FaceRecognitionCtr extends Component { ...@@ -178,6 +200,10 @@ export class FaceRecognitionCtr extends Component {
}, VIEW_INDEX.TOP); }, VIEW_INDEX.TOP);
} }
showGameDesc() {
viewMgr.openView(VIEW_DEF.FaceRgGameDescView);
}
startRound(isDelay: boolean) { startRound(isDelay: boolean) {
this.creSixPerson(); this.creSixPerson();
viewMgr.openView(VIEW_DEF.FaceRgWatchView, (node) => { viewMgr.openView(VIEW_DEF.FaceRgWatchView, (node) => {
...@@ -215,15 +241,23 @@ export class FaceRecognitionCtr extends Component { ...@@ -215,15 +241,23 @@ export class FaceRecognitionCtr extends Component {
this.bestScore = this.curScore; this.bestScore = this.curScore;
} }
if (this.curScore >= this.succScore) { if (this.curScore >= this.succScore) {
viewMgr.openView(VIEW_DEF.ChallengeSuccView, (node) => { // viewMgr.openView(VIEW_DEF.ChallengeSuccView, (node) => {
// find("Audio")?.getComponent(AudioCtr)?.playOneShot(this.audioSrc.getMus("SCCESS")!);
// node?.getComponent(ChallengeSuccView)?.init();
// }, VIEW_INDEX.TOP);
viewMgr.openView(VIEW_DEF.ScoreSuccView, (node) => {
find("Audio")?.getComponent(AudioCtr)?.playOneShot(this.audioSrc.getMus("SCCESS")!); find("Audio")?.getComponent(AudioCtr)?.playOneShot(this.audioSrc.getMus("SCCESS")!);
node?.getComponent(ChallengeSuccView)?.init(); node?.getComponent(ScoreSuccView)?.setData(this.costTime, this.getEvaluation(this.curScore));
}, VIEW_INDEX.TOP); }, VIEW_INDEX.TOP);
} }
else { else {
viewMgr.openView(VIEW_DEF.ChallengeFailView, (node) => { // viewMgr.openView(VIEW_DEF.ScoreFailView, (node) => {
// find("Audio")?.getComponent(AudioCtr)?.playOneShot(this.audioSrc.getMus("FAIL")!);
// node?.getComponent(ChallengeFailView);
// }, VIEW_INDEX.TOP);
viewMgr.openView(VIEW_DEF.ScoreFailView, (node) => {
find("Audio")?.getComponent(AudioCtr)?.playOneShot(this.audioSrc.getMus("FAIL")!); find("Audio")?.getComponent(AudioCtr)?.playOneShot(this.audioSrc.getMus("FAIL")!);
node?.getComponent(ChallengeFailView); node?.getComponent(ScoreFailView)?.setData(this.costTime, this.getEvaluation(this.curScore));
}, VIEW_INDEX.TOP); }, VIEW_INDEX.TOP);
} }
} }
......
import { _decorator, Component, Node, director } from 'cc';
import { VIEW_DEF } from '../../../../startFolder/script/common/ViewDef';
import { viewMgr } from '../../../../startFolder/script/common/ViewMgr';
import { GameDescView } from '../../commonView/script/GameDescView';
const { ccclass, property } = _decorator;
@ccclass('FaceRgGameDescView')
export class FaceRgGameDescView extends GameDescView {
// [1]
// dummy = '';
// [2]
// @property
// serializableDummy = 0;
start () {
// [3]
}
onClose() {
director.emit("game_desc_close");
viewMgr.closeView(VIEW_DEF.FaceRgGameDescView);
}
setDesc(text: string) {
// this.descLab.string = text;
}
// update (deltaTime: number) {
// // [4]
// }
}
/**
* [1] Class member could be defined like this.
* [2] Use `property` decorator if your want the member to be serializable.
* [3] Your initialization goes here.
* [4] Your update function goes here.
*
* Learn more about scripting: https://docs.cocos.com/creator/3.0/manual/en/scripting/
* Learn more about CCClass: https://docs.cocos.com/creator/3.0/manual/en/scripting/ccclass.html
* Learn more about life-cycle callbacks: https://docs.cocos.com/creator/3.0/manual/en/scripting/life-cycle-callbacks.html
*/
{
"ver": "4.0.22",
"importer": "typescript",
"imported": true,
"uuid": "feff1c5d-620c-418d-b05c-5ddc6b4c7da4",
"files": [],
"subMetas": {},
"userData": {}
}
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "c6460b61-060c-449f-b281-1892560e4ede",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}
{
"ver": "1.0.21",
"importer": "image",
"imported": true,
"uuid": "907d3eef-24d2-416a-a2b5-c9e0c6021b89",
"files": [
".png",
".json"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "907d3eef-24d2-416a-a2b5-c9e0c6021b89@6c48a",
"displayName": "弹窗-失败底框",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0,
"isUuid": true,
"imageUuidOrDatabaseUri": "907d3eef-24d2-416a-a2b5-c9e0c6021b89"
},
"ver": "1.0.21",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "907d3eef-24d2-416a-a2b5-c9e0c6021b89@f9941",
"displayName": "弹窗-失败底框",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 600,
"height": 460,
"rawWidth": 600,
"rawHeight": 460,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"isUuid": true,
"imageUuidOrDatabaseUri": "907d3eef-24d2-416a-a2b5-c9e0c6021b89@6c48a",
"atlasUuid": ""
},
"ver": "1.0.9",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"hasAlpha": true,
"type": "sprite-frame",
"redirect": "907d3eef-24d2-416a-a2b5-c9e0c6021b89@f9941"
}
}
{
"ver": "1.0.21",
"importer": "image",
"imported": true,
"uuid": "15867b35-0a2a-405e-88bc-632307c981bf",
"files": [
".png",
".json"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "15867b35-0a2a-405e-88bc-632307c981bf@6c48a",
"displayName": "弹窗-成功底框",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0,
"isUuid": true,
"imageUuidOrDatabaseUri": "15867b35-0a2a-405e-88bc-632307c981bf"
},
"ver": "1.0.21",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "15867b35-0a2a-405e-88bc-632307c981bf@f9941",
"displayName": "弹窗-成功底框",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 600,
"height": 460,
"rawWidth": 600,
"rawHeight": 460,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"isUuid": true,
"imageUuidOrDatabaseUri": "15867b35-0a2a-405e-88bc-632307c981bf@6c48a",
"atlasUuid": ""
},
"ver": "1.0.9",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"hasAlpha": true,
"type": "sprite-frame",
"redirect": "15867b35-0a2a-405e-88bc-632307c981bf@f9941"
}
}
{
"ver": "1.0.21",
"importer": "image",
"imported": true,
"uuid": "883c6d5c-3d8b-4062-8e80-cf571f4de7ec",
"files": [
".png",
".json"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "883c6d5c-3d8b-4062-8e80-cf571f4de7ec@6c48a",
"displayName": "恭喜你闯关成功!",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0,
"isUuid": true,
"imageUuidOrDatabaseUri": "883c6d5c-3d8b-4062-8e80-cf571f4de7ec"
},
"ver": "1.0.21",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "883c6d5c-3d8b-4062-8e80-cf571f4de7ec@f9941",
"displayName": "恭喜你闯关成功!",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 459,
"height": 59,
"rawWidth": 459,
"rawHeight": 59,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"isUuid": true,
"imageUuidOrDatabaseUri": "883c6d5c-3d8b-4062-8e80-cf571f4de7ec@6c48a",
"atlasUuid": ""
},
"ver": "1.0.9",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"hasAlpha": true,
"type": "sprite-frame",
"redirect": "883c6d5c-3d8b-4062-8e80-cf571f4de7ec@f9941"
}
}
{
"ver": "1.0.21",
"importer": "image",
"imported": true,
"uuid": "dff27926-3176-4437-a583-d5fb7accc7cb",
"files": [
".png",
".json"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "dff27926-3176-4437-a583-d5fb7accc7cb@6c48a",
"displayName": "本次闯关失败!",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0,
"isUuid": true,
"imageUuidOrDatabaseUri": "dff27926-3176-4437-a583-d5fb7accc7cb"
},
"ver": "1.0.21",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "dff27926-3176-4437-a583-d5fb7accc7cb@f9941",
"displayName": "本次闯关失败!",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 396,
"height": 60,
"rawWidth": 396,
"rawHeight": 60,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"isUuid": true,
"imageUuidOrDatabaseUri": "dff27926-3176-4437-a583-d5fb7accc7cb@6c48a",
"atlasUuid": ""
},
"ver": "1.0.9",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"hasAlpha": true,
"type": "sprite-frame",
"redirect": "dff27926-3176-4437-a583-d5fb7accc7cb@f9941"
}
}
{
"ver": "1.1.27",
"importer": "prefab",
"imported": true,
"uuid": "f8f72ce3-6052-4d2c-8b97-f01c2abb9f54",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "ScoreFailView"
}
}
{
"ver": "1.1.27",
"importer": "prefab",
"imported": true,
"uuid": "8c7b7c1c-6f39-43f2-a1b5-8e3c7c16f684",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "ScoreSuccView"
}
}
import { _decorator, Component, Node, Label } from 'cc';
const { ccclass, property } = _decorator;
@ccclass('ScoreFailView')
export class ScoreFailView extends Component {
// [1]
@property(Label)
scoreLab: Label = null!;
@property(Label)
evaluationLab: Label = null!;
start () {
// [3]
}
setData(time: number, evaluation: string){
this.scoreLab.string = `最终成绩:${time.toFixed(1)}s`;
this.evaluationLab.string = `评价:${evaluation}`;
}
}
/**
* [1] Class member could be defined like this.
* [2] Use `property` decorator if your want the member to be serializable.
* [3] Your initialization goes here.
* [4] Your update function goes here.
*
* Learn more about scripting: https://docs.cocos.com/creator/3.0/manual/en/scripting/
* Learn more about CCClass: https://docs.cocos.com/creator/3.0/manual/en/scripting/ccclass.html
* Learn more about life-cycle callbacks: https://docs.cocos.com/creator/3.0/manual/en/scripting/life-cycle-callbacks.html
*/
{
"ver": "4.0.22",
"importer": "typescript",
"imported": true,
"uuid": "854432ac-0ddc-4aa7-8619-7188d1af0701",
"files": [],
"subMetas": {},
"userData": {}
}
import { _decorator, Component, Node, Label } from 'cc';
const { ccclass, property } = _decorator;
@ccclass('ScoreSuccView')
export class ScoreSuccView extends Component {
@property(Label)
scoreLab: Label = null!;
@property(Label)
evaluationLab: Label = null!;
start () {
// [3]
}
setData(time: number, evaluation: string){
this.scoreLab.string = `最终成绩:${time.toFixed(1)}s`;
this.evaluationLab.string = `评价:${evaluation}`;
}
// update (deltaTime: number) {
// // [4]
// }
}
{
"ver": "4.0.22",
"importer": "typescript",
"imported": true,
"uuid": "6b128900-7576-4abf-805a-25885456cafa",
"files": [],
"subMetas": {},
"userData": {}
}
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
"__id__": 7 "__id__": 7
}, },
{ {
"__id__": 68 "__id__": 81
} }
], ],
"_active": true, "_active": true,
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
"_prefab": null, "_prefab": null,
"autoReleaseAssets": false, "autoReleaseAssets": false,
"_globals": { "_globals": {
"__id__": 71 "__id__": 84
}, },
"_id": "da15b8d1-f87c-403a-a988-0d868c220326" "_id": "da15b8d1-f87c-403a-a988-0d868c220326"
}, },
...@@ -210,21 +210,24 @@ ...@@ -210,21 +210,24 @@
}, },
{ {
"__id__": 16 "__id__": 16
},
{
"__id__": 61
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 61 "__id__": 74
}, },
{ {
"__id__": 63 "__id__": 76
}, },
{ {
"__id__": 65 "__id__": 78
}, },
{ {
"__id__": 67 "__id__": 80
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1608,17 +1611,357 @@ ...@@ -1608,17 +1611,357 @@
"_lockFlags": 0, "_lockFlags": 0,
"_id": "14p5IC8jtLXJHhyrJEhA97" "_id": "14p5IC8jtLXJHhyrJEhA97"
}, },
{
"__type__": "cc.Node",
"_name": "按钮",
"_objFlags": 0,
"_parent": {
"__id__": 7
},
"_children": [
{
"__id__": 62
}
],
"_active": true,
"_components": [
{
"__id__": 67
},
{
"__id__": 69
},
{
"__id__": 71
},
{
"__id__": 73
}
],
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 504.826,
"y": -280.643,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": "08Efc14CxN+pLjxRGzmy8A"
},
{
"__type__": "cc.Node",
"_name": "Label",
"_objFlags": 0,
"_parent": {
"__id__": 61
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 63
},
{
"__id__": 65
}
],
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": "dbcCq+V7VKS6VyJUELlBg4"
},
{ {
"__type__": "cc.UITransform", "__type__": "cc.UITransform",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 7 "__id__": 62
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 64
},
"_contentSize": {
"__type__": "cc.Size",
"width": 160,
"height": 52.92
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": "958ZKkPrNLUYASQt1i64YJ"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "c68UOAlNhN171Umca6yVvF"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 62 "__id__": 62
}, },
"_enabled": true,
"__prefab": {
"__id__": 66
},
"_visFlags": 0,
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_string": "游戏说明",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 40,
"_fontSize": 40,
"_fontFamily": "Arial",
"_lineHeight": 42,
"_overflow": 0,
"_enableWrapText": true,
"_font": null,
"_isSystemFontUsed": true,
"_isItalic": false,
"_isBold": false,
"_isUnderline": false,
"_underlineHeight": 2,
"_cacheMode": 0,
"_id": "10O0XNvCZMQpuGcdjqF9fB"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "2frm37uaJHQr0AEEaYyM82"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 61
},
"_enabled": true,
"__prefab": {
"__id__": 68
},
"_contentSize": {
"__type__": "cc.Size",
"width": 262,
"height": 92
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": "1bae6I7ptOgqzlXtIwtVme"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "f7NISe7HdAD68SLfhnddy8"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 61
},
"_enabled": true,
"__prefab": {
"__id__": 70
},
"_visFlags": 0,
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "d458ca81-0b9f-49b9-99f8-3ccbf8b87331@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 1,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": "acCviH0RRMQoMKYL3mmVDa"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "e71ctEmpxFC4KlSYRZNz/a"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 61
},
"_enabled": true,
"__prefab": null,
"clickEvents": [
{
"__id__": 72
}
],
"_interactable": true,
"_transition": 3,
"_normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_hoverColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_pressedColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_normalSprite": {
"__uuid__": "d458ca81-0b9f-49b9-99f8-3ccbf8b87331@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_hoverSprite": null,
"_pressedSprite": null,
"_disabledSprite": null,
"_duration": 0.1,
"_zoomScale": 0.85,
"_target": null,
"_id": "59U9sfhohF07nb39nNB1/k"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 7
},
"component": "",
"_componentId": "40181kRIdBO8JWSVontWBF/",
"handler": "showGameDesc",
"customEventData": ""
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 61
},
"_enabled": true,
"__prefab": null,
"_alignFlags": 36,
"_target": null,
"_left": 1040.826,
"_right": 31.173999999999978,
"_top": 0,
"_bottom": 48.35700000000003,
"_horizontalCenter": 0,
"_verticalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 262,
"_originalHeight": 0,
"_alignMode": 2,
"_lockFlags": 0,
"_id": "55mvDHvjBDZaQQj+zHDNZx"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
},
"_enabled": true,
"__prefab": {
"__id__": 75
},
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 1334, "width": 1334,
...@@ -1644,7 +1987,7 @@ ...@@ -1644,7 +1987,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 64 "__id__": 77
}, },
"_cameraComponent": { "_cameraComponent": {
"__id__": 9 "__id__": 9
...@@ -1665,7 +2008,7 @@ ...@@ -1665,7 +2008,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 66 "__id__": 79
}, },
"_alignFlags": 45, "_alignFlags": 45,
"_target": null, "_target": null,
...@@ -1701,9 +2044,9 @@ ...@@ -1701,9 +2044,9 @@
"_enabled": true, "_enabled": true,
"__prefab": null, "__prefab": null,
"gameId": 5001, "gameId": 5001,
"totalTime": 90, "totalTime": 60,
"oneScore": 1, "oneScore": 1,
"succScore": 20, "succScore": 10,
"curScoreLab": { "curScoreLab": {
"__id__": 27 "__id__": 27
}, },
...@@ -1735,10 +2078,10 @@ ...@@ -1735,10 +2078,10 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 69 "__id__": 82
}, },
{ {
"__id__": 70 "__id__": 83
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1775,7 +2118,7 @@ ...@@ -1775,7 +2118,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 68 "__id__": 81
}, },
"_enabled": true, "_enabled": true,
"__prefab": null, "__prefab": null,
...@@ -1790,28 +2133,28 @@ ...@@ -1790,28 +2133,28 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 68 "__id__": 81
}, },
"_enabled": true, "_enabled": true,
"__prefab": null, "__prefab": null,
"audioSource": { "audioSource": {
"__id__": 69 "__id__": 82
}, },
"_id": "18RXqvEVtPX7aZDv9zO3vq" "_id": "18RXqvEVtPX7aZDv9zO3vq"
}, },
{ {
"__type__": "cc.SceneGlobals", "__type__": "cc.SceneGlobals",
"ambient": { "ambient": {
"__id__": 72 "__id__": 85
}, },
"shadows": { "shadows": {
"__id__": 73 "__id__": 86
}, },
"_skybox": { "_skybox": {
"__id__": 74 "__id__": 87
}, },
"fog": { "fog": {
"__id__": 75 "__id__": 88
} }
}, },
{ {
......
...@@ -72,6 +72,12 @@ interface ViewPathItf { ...@@ -72,6 +72,12 @@ interface ViewPathItf {
DmfDescView: ViewPathUnitItf, DmfDescView: ViewPathUnitItf,
//环形幻方游戏说明弹窗 //环形幻方游戏说明弹窗
RingSumDescView: ViewPathUnitItf, RingSumDescView: ViewPathUnitItf,
//人脸识别说明弹窗
FaceRgGameDescView: ViewPathUnitItf,
//失败弹窗
ScoreFailView: ViewPathUnitItf,
//成功弹窗
ScoreSuccView: ViewPathUnitItf,
//测试弹窗 //测试弹窗
TestView_1: ViewPathUnitItf TestView_1: ViewPathUnitItf
} }
...@@ -212,4 +218,18 @@ export const VIEW_DEF: ViewPathItf = { ...@@ -212,4 +218,18 @@ export const VIEW_DEF: ViewPathItf = {
bundleName: "sceneBundle", bundleName: "sceneBundle",
path: "games/ringSum/prefab/RingSumDescView", path: "games/ringSum/prefab/RingSumDescView",
}, },
FaceRgGameDescView: {
bundleName: "sceneBundle",
path: "games/FaceRecognition/prefab/FaceRgGameDescView",
},
//失败弹窗
ScoreFailView: {
bundleName: "sceneBundle",
path: "games/commonView/prefab/ScoreFailView",
},
//成功弹窗
ScoreSuccView: {
bundleName: "sceneBundle",
path: "games/commonView/prefab/ScoreSuccView",
},
} }
\ No newline at end of file
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