Commit 3994314e authored by 徐行's avatar 徐行

幻形改好了

parent 24c9c8f8
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "11583acb-139d-4ebd-986b-c5ff91cfacf9",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}
{
"ver": "1.0.21",
"importer": "image",
"imported": true,
"uuid": "1dbd7696-fe11-4d7b-8166-04a1543e14a2",
"files": [
".png",
".json"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "1dbd7696-fe11-4d7b-8166-04a1543e14a2@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": "1dbd7696-fe11-4d7b-8166-04a1543e14a2"
},
"ver": "1.0.21",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "1dbd7696-fe11-4d7b-8166-04a1543e14a2@f9941",
"displayName": "清除按钮",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 160,
"height": 80,
"rawWidth": 160,
"rawHeight": 80,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"isUuid": true,
"imageUuidOrDatabaseUri": "1dbd7696-fe11-4d7b-8166-04a1543e14a2@6c48a",
"atlasUuid": ""
},
"ver": "1.0.9",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"hasAlpha": true,
"type": "sprite-frame",
"redirect": "1dbd7696-fe11-4d7b-8166-04a1543e14a2@f9941"
}
}
{
"ver": "1.0.21",
"importer": "image",
"imported": true,
"uuid": "fc3d03d5-7b6d-4e45-937e-2caa9671a8e3",
"files": [
".png",
".json"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "fc3d03d5-7b6d-4e45-937e-2caa9671a8e3@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": "fc3d03d5-7b6d-4e45-937e-2caa9671a8e3"
},
"ver": "1.0.21",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "fc3d03d5-7b6d-4e45-937e-2caa9671a8e3@f9941",
"displayName": "点亮-提交按钮",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 160,
"height": 80,
"rawWidth": 160,
"rawHeight": 80,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"isUuid": true,
"imageUuidOrDatabaseUri": "fc3d03d5-7b6d-4e45-937e-2caa9671a8e3@6c48a",
"atlasUuid": ""
},
"ver": "1.0.9",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"hasAlpha": true,
"type": "sprite-frame",
"redirect": "fc3d03d5-7b6d-4e45-937e-2caa9671a8e3@f9941"
}
}
{
"ver": "1.0.21",
"importer": "image",
"imported": true,
"uuid": "7beb7bf0-bbae-42cf-aaf7-3e0bf09cc626",
"files": [
".png",
".json"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "7beb7bf0-bbae-42cf-aaf7-3e0bf09cc626@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": "7beb7bf0-bbae-42cf-aaf7-3e0bf09cc626"
},
"ver": "1.0.21",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "7beb7bf0-bbae-42cf-aaf7-3e0bf09cc626@f9941",
"displayName": "玩法说明",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 329,
"height": 278,
"rawWidth": 329,
"rawHeight": 278,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"isUuid": true,
"imageUuidOrDatabaseUri": "7beb7bf0-bbae-42cf-aaf7-3e0bf09cc626@6c48a",
"atlasUuid": ""
},
"ver": "1.0.9",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"hasAlpha": true,
"type": "sprite-frame",
"redirect": "7beb7bf0-bbae-42cf-aaf7-3e0bf09cc626@f9941"
}
}
{
"ver": "1.0.21",
"importer": "image",
"imported": true,
"uuid": "38d4f4a5-2a4a-4961-bbd9-549c7a2d53f3",
"files": [
".png",
".json"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "38d4f4a5-2a4a-4961-bbd9-549c7a2d53f3@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": "38d4f4a5-2a4a-4961-bbd9-549c7a2d53f3"
},
"ver": "1.0.21",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "38d4f4a5-2a4a-4961-bbd9-549c7a2d53f3@f9941",
"displayName": "置灰-提交按钮",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 160,
"height": 80,
"rawWidth": 160,
"rawHeight": 80,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"isUuid": true,
"imageUuidOrDatabaseUri": "38d4f4a5-2a4a-4961-bbd9-549c7a2d53f3@6c48a",
"atlasUuid": ""
},
"ver": "1.0.9",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"hasAlpha": true,
"type": "sprite-frame",
"redirect": "38d4f4a5-2a4a-4961-bbd9-549c7a2d53f3@f9941"
}
}
{
"ver": "1.0.21",
"importer": "image",
"imported": true,
"uuid": "eb8066ec-8462-414a-94bc-bb8b894071cb",
"files": [
".png",
".json"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "eb8066ec-8462-414a-94bc-bb8b894071cb@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": "eb8066ec-8462-414a-94bc-bb8b894071cb"
},
"ver": "1.0.21",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "eb8066ec-8462-414a-94bc-bb8b894071cb@f9941",
"displayName": "键盘底框",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 360,
"height": 280,
"rawWidth": 360,
"rawHeight": 280,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"isUuid": true,
"imageUuidOrDatabaseUri": "eb8066ec-8462-414a-94bc-bb8b894071cb@6c48a",
"atlasUuid": ""
},
"ver": "1.0.9",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"hasAlpha": true,
"type": "sprite-frame",
"redirect": "eb8066ec-8462-414a-94bc-bb8b894071cb@f9941"
}
}
......@@ -112,6 +112,17 @@ export class RingSumCircle extends Component {
}
}
isFillFinished(){
for (let i = 0; i < this.itemArr.length; ++i) {
for (let j = 0; j < this.itemArr.length; ++j) {
if (this.itemArr[i][j].getItemType() == RS_ITEM_TYPE.NOR && this.itemArr[i][j].getText() == "?") {
return false;
}
}
}
return true;
}
// update (deltaTime: number) {
// // [4]
// }
......
import { _decorator, Component, Node, director, Label, CCFloat } from 'cc';
import { _decorator, Component, Node, director, Label, CCFloat, Button } from 'cc';
import { countdownMus, failMus, succMus } from '../../../../startFolder/script/common/AudioDef';
import { AudioMgr } from '../../../../startFolder/script/common/AudioMgr';
import { Calculator } from '../../../../startFolder/script/common/Calculator';
......@@ -41,6 +41,9 @@ export class RingSumCtr extends Component {
@property(Label)
resultLab: Label = null!;
@property(Button)
submmitBtn: Button = null!;
private level = 2;
private levelData: RingSumCfg = null!;
......@@ -89,16 +92,17 @@ export class RingSumCtr extends Component {
director.on("rsitem_click", this.onItemClick, this);
director.on("begin_countdown_end", () => {
//引导
if (!this.isShowGameDescViewOnce) {
this.gameState = GAME_STATE.PAUSE;
this.isShowGameDescViewOnce = true;
viewMgr.openView(VIEW_DEF.RingSumDescView, (node) => {
node.getComponent(RingSumDescView)?.autoClose();
});
}
else {
this.gameState = GAME_STATE.RUN;
}
// if (!this.isShowGameDescViewOnce) {
// this.gameState = GAME_STATE.PAUSE;
// this.isShowGameDescViewOnce = true;
// viewMgr.openView(VIEW_DEF.RingSumDescView, (node) => {
// node.getComponent(RingSumDescView)?.autoClose();
// });
// }
// else {
// this.gameState = GAME_STATE.RUN;
// }
this.gameState = GAME_STATE.RUN;
}, this);
director.on("game_desc_close", this.onCloseGameDescView, this);
this.gameStart();
......@@ -114,7 +118,7 @@ export class RingSumCtr extends Component {
this.countdownLab.string = Utils.formatTime(Math.floor(this.totalTime * 1000));
this.curRSItem = null!;
this.loadLevelData();
this.resultLab.string = `答案:${this.levelData.result}`;
this.resultLab.string = `幻和为:${this.levelData.result}`;
this.circle.setAllText(this.levelData.numStrArr);
this.circle.setAllItemType(this.levelData.fixCtrArr);
this.circle.hideAllNorItemText();
......@@ -129,6 +133,7 @@ export class RingSumCtr extends Component {
this.countdownLab.string = Utils.formatTime(gameEndTime - new Date().getTime());
}
//
this.submmitBtn.interactable = false;
}
calculator(numStrArr: string[]): number | undefined {
......@@ -197,6 +202,7 @@ export class RingSumCtr extends Component {
str += flag;
}
this.curRSItem.setText(str);
this.submmitBtn.interactable = this.circle.isFillFinished();
}
onSubmitBtnClick() {
......
......@@ -17,7 +17,7 @@ export class TempCtr extends Component {
assetManager.loadBundle("audio");
CanvasSizeCtr.setContentStrategy();
assetManager.loadBundle("sceneBundle", (err, bundle) => {
bundle.loadScene("VHFillNum_1", (err_1, scene: Scene) => {
bundle.loadScene("RingSum_1", (err_1, scene: Scene) => {
if (err_1) {
log(`加载场景传入的场景名字有错`);
log(err_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