Commit f0d2654b authored by 徐行's avatar 徐行

纵横填数增加配置表

parent 8480ffd6
...@@ -123,3 +123,31 @@ export const vhfn_lv_4: VHFillNumCfg = { ...@@ -123,3 +123,31 @@ export const vhfn_lv_4: VHFillNumCfg = {
], ],
options: [2, 7, 8, 11, 40] options: [2, 7, 8, 11, 40]
} }
export const vhfn_lv_5: VHFillNumCfg = {
row: 4,
column: 4,
numArr: [
[12, 12, 7, 17],
[1, 3, 6, 19],
[5, 6, 2, 8],
[16, 24, 11, -1]
],
emptyCtrArr: [
[0, 1, 0, 1],
[1, 0, 1, 1],
[1, 0, 1, 1],
[1, 1, 1, 1]
],
rowSymb: [
["+", "-", "="],
["+", "×", "="],
["+", "÷", "="]
],
columnSymb: [
["-", "÷", "+"],
["+", "×", "-"],
["=", "=", "="],
],
options: [2, 7, 8, 11, 40]
}
...@@ -12,7 +12,7 @@ import { GameDescView } from '../../commonView/script/GameDescView'; ...@@ -12,7 +12,7 @@ import { GameDescView } from '../../commonView/script/GameDescView';
import { ScoreFailView } from '../../commonView/script/ScoreFailView'; import { ScoreFailView } from '../../commonView/script/ScoreFailView';
import { ScoreSuccView } from '../../commonView/script/ScoreSuccView'; import { ScoreSuccView } from '../../commonView/script/ScoreSuccView';
import { SwitchOkView } from '../../commonView/script/SwitchOkView'; import { SwitchOkView } from '../../commonView/script/SwitchOkView';
import { VHFillNumCfg, vhfn_lv_1, vhfn_lv_2, vhfn_lv_3, vhfn_lv_4 } from './VHFillNumCfg'; import { VHFillNumCfg, vhfn_lv_1, vhfn_lv_2, vhfn_lv_3, vhfn_lv_4, vhfn_lv_5 } from './VHFillNumCfg';
import { VHFillNumItem, VHFN_ITEM_TYPE } from './VHFillNumItem'; import { VHFillNumItem, VHFN_ITEM_TYPE } from './VHFillNumItem';
const { ccclass, property } = _decorator; const { ccclass, property } = _decorator;
...@@ -58,7 +58,7 @@ export class VHFillNumCtr extends Component { ...@@ -58,7 +58,7 @@ export class VHFillNumCtr extends Component {
private itemPosIfoArr: ItemPosIfo[] = []; private itemPosIfoArr: ItemPosIfo[] = [];
private row = 4; private row = 4;
private column = 4; private column = 4;
private level = 4; private level = 5;
private levelData: VHFillNumCfg = null!; private levelData: VHFillNumCfg = null!;
private selNum = 0; private selNum = 0;
...@@ -486,6 +486,9 @@ export class VHFillNumCtr extends Component { ...@@ -486,6 +486,9 @@ export class VHFillNumCtr extends Component {
case 4: case 4:
this.levelData = vhfn_lv_4; this.levelData = vhfn_lv_4;
break; break;
case 5:
this.levelData = vhfn_lv_5;
break;
default: default:
this.levelData = vhfn_lv_1; this.levelData = vhfn_lv_1;
break; break;
......
...@@ -6,6 +6,7 @@ import { Calculator } from '../../../../startFolder/script/common/Calculator'; ...@@ -6,6 +6,7 @@ import { Calculator } from '../../../../startFolder/script/common/Calculator';
import { Utils } from '../../../../startFolder/script/common/Utils'; import { Utils } from '../../../../startFolder/script/common/Utils';
import { VIEW_DEF } from '../../../../startFolder/script/common/ViewDef'; import { VIEW_DEF } from '../../../../startFolder/script/common/ViewDef';
import { viewMgr, VIEW_INDEX } from '../../../../startFolder/script/common/ViewMgr'; import { viewMgr, VIEW_INDEX } from '../../../../startFolder/script/common/ViewMgr';
import { GameEndDataItf_1, htmlSendDataMgr } from '../../../../startFolder/script/HtmlSendDataMgr';
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';
...@@ -252,10 +253,23 @@ export class RingSumCtr extends Component { ...@@ -252,10 +253,23 @@ export class RingSumCtr extends Component {
node.getComponent(ScoreFailView)?.setData(1, "C"); node.getComponent(ScoreFailView)?.setData(1, "C");
}, VIEW_INDEX.TOP); }, VIEW_INDEX.TOP);
} }
//把数据发给包裹游戏的容器
let score = Math.floor(this.totalTime - this.costTime);
let sendOutData: GameEndDataItf_1 = {
gameId: 2222222,
gameScore: score < 0 ? 0 : score,
gameEvaluation: this.getGrade(),
durTime: Math.floor(this.costTime * 1000),
totalTime: Math.floor(this.costTime * 1000),
finishRate: score < 0 ? 0 : score,
type: "cocos_game"
}
htmlSendDataMgr.sendDataOut(JSON.stringify(sendOutData));
//************************** */
} }
getGrade() { getGrade() {
let rate = this.costTime / this.totalTime; let rate = this.costTime / (this.totalTime - 3.5);
console.log(`打印花费时间比:${rate}`); console.log(`打印花费时间比:${rate}`);
if (rate <= 0.45) { if (rate <= 0.45) {
return "S"; return "S";
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
"_prefab": null, "_prefab": null,
"autoReleaseAssets": false, "autoReleaseAssets": false,
"_globals": { "_globals": {
"__id__": 24 "__id__": 23
}, },
"_id": "d9b41389-e8bc-407f-85b3-2ffcd12b9b94" "_id": "d9b41389-e8bc-407f-85b3-2ffcd12b9b94"
}, },
...@@ -209,16 +209,16 @@ ...@@ -209,16 +209,16 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 17 "__id__": 16
}, },
{ {
"__id__": 19 "__id__": 18
}, },
{ {
"__id__": 21 "__id__": 20
}, },
{ {
"__id__": 23 "__id__": 22
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -306,7 +306,7 @@ ...@@ -306,7 +306,7 @@
"_priority": 1073741824, "_priority": 1073741824,
"_fov": 45, "_fov": 45,
"_fovAxis": 0, "_fovAxis": 0,
"_orthoHeight": 412.6301633045149, "_orthoHeight": 375,
"_near": 1, "_near": 1,
"_far": 2000, "_far": 2000,
"_color": { "_color": {
...@@ -336,7 +336,7 @@ ...@@ -336,7 +336,7 @@
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "SpriteSplash", "_name": "logo",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 7 "__id__": 7
...@@ -352,9 +352,6 @@ ...@@ -352,9 +352,6 @@
}, },
{ {
"__id__": 15 "__id__": 15
},
{
"__id__": 16
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -384,7 +381,7 @@ ...@@ -384,7 +381,7 @@
"y": 0, "y": 0,
"z": 0 "z": 0
}, },
"_id": "5crwMrCrVLd7mTdh400q/w" "_id": "aatVJZuvtOXJJ+YQ71SjRz"
}, },
{ {
"__type__": "cc.UITransform", "__type__": "cc.UITransform",
...@@ -407,11 +404,11 @@ ...@@ -407,11 +404,11 @@
"x": 0.5, "x": 0.5,
"y": 0.5 "y": 0.5
}, },
"_id": "56qmRRdLFFH62ZboX44qhy" "_id": "6av+iQeztPmJv/6ARwlf8y"
}, },
{ {
"__type__": "cc.CompPrefabInfo", "__type__": "cc.CompPrefabInfo",
"fileId": "55pCbtzR5GbojKMArZkfim" "fileId": "f7NISe7HdAD68SLfhnddy8"
}, },
{ {
"__type__": "cc.Sprite", "__type__": "cc.Sprite",
...@@ -430,18 +427,18 @@ ...@@ -430,18 +427,18 @@
"_dstBlendFactor": 4, "_dstBlendFactor": 4,
"_color": { "_color": {
"__type__": "cc.Color", "__type__": "cc.Color",
"r": 0, "r": 255,
"g": 0, "g": 255,
"b": 0, "b": 255,
"a": 255 "a": 255
}, },
"_spriteFrame": { "_spriteFrame": {
"__uuid__": "7d8f9b89-4fd1-4c9f-a3ab-38ec7cded7ca@f9941", "__uuid__": "defc3b85-596e-4de2-b0ca-b50adb093258@f9941",
"__expectedType__": "cc.SpriteFrame" "__expectedType__": "cc.SpriteFrame"
}, },
"_type": 0, "_type": 0,
"_fillType": 0, "_fillType": 0,
"_sizeMode": 0, "_sizeMode": 1,
"_fillCenter": { "_fillCenter": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 0, "x": 0,
...@@ -452,11 +449,11 @@ ...@@ -452,11 +449,11 @@
"_isTrimmedMode": true, "_isTrimmedMode": true,
"_useGrayscale": false, "_useGrayscale": false,
"_atlas": null, "_atlas": null,
"_id": "abyvKMW8ZGDYuZy0M1T4Z8" "_id": "b3jnuC49NBPIuKvW4zZzaL"
}, },
{ {
"__type__": "cc.CompPrefabInfo", "__type__": "cc.CompPrefabInfo",
"fileId": "20UGQn4U9GUoln0NJQTkbG" "fileId": "e71ctEmpxFC4KlSYRZNz/a"
}, },
{ {
"__type__": "cc.Widget", "__type__": "cc.Widget",
...@@ -481,22 +478,11 @@ ...@@ -481,22 +478,11 @@
"_isAbsBottom": true, "_isAbsBottom": true,
"_isAbsHorizontalCenter": true, "_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true, "_isAbsVerticalCenter": true,
"_originalWidth": 100, "_originalWidth": 1334,
"_originalHeight": 100, "_originalHeight": 750,
"_alignMode": 2, "_alignMode": 2,
"_lockFlags": 0, "_lockFlags": 0,
"_id": "33Yu7CuJJGvZX8JO1LyMKf" "_id": "82fD3UsC1LOrmUqdbxj3MB"
},
{
"__type__": "604c0Rsx9hKQ5c8fT4i3RGP",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 10
},
"_enabled": true,
"__prefab": null,
"_id": "54Bvznv5JAlatcY9UB10o6"
}, },
{ {
"__type__": "cc.UITransform", "__type__": "cc.UITransform",
...@@ -507,7 +493,7 @@ ...@@ -507,7 +493,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 18 "__id__": 17
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
...@@ -534,7 +520,7 @@ ...@@ -534,7 +520,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 20 "__id__": 19
}, },
"_cameraComponent": { "_cameraComponent": {
"__id__": 9 "__id__": 9
...@@ -555,7 +541,7 @@ ...@@ -555,7 +541,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 22 "__id__": 21
}, },
"_alignFlags": 45, "_alignFlags": 45,
"_target": null, "_target": null,
...@@ -595,16 +581,16 @@ ...@@ -595,16 +581,16 @@
{ {
"__type__": "cc.SceneGlobals", "__type__": "cc.SceneGlobals",
"ambient": { "ambient": {
"__id__": 25 "__id__": 24
}, },
"shadows": { "shadows": {
"__id__": 26 "__id__": 25
}, },
"_skybox": { "_skybox": {
"__id__": 27 "__id__": 26
}, },
"fog": { "fog": {
"__id__": 28 "__id__": 27
} }
}, },
{ {
......
{
"ver": "1.0.21",
"importer": "image",
"imported": true,
"uuid": "defc3b85-596e-4de2-b0ca-b50adb093258",
"files": [
".png",
".json"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "defc3b85-596e-4de2-b0ca-b50adb093258@6c48a",
"displayName": "logo",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0,
"isUuid": true,
"imageUuidOrDatabaseUri": "defc3b85-596e-4de2-b0ca-b50adb093258"
},
"ver": "1.0.21",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "defc3b85-596e-4de2-b0ca-b50adb093258@f9941",
"displayName": "logo",
"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": "defc3b85-596e-4de2-b0ca-b50adb093258@6c48a",
"atlasUuid": ""
},
"ver": "1.0.9",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"hasAlpha": false,
"type": "sprite-frame",
"redirect": "defc3b85-596e-4de2-b0ca-b50adb093258@f9941"
}
}
...@@ -17,7 +17,7 @@ export class TempCtr extends Component { ...@@ -17,7 +17,7 @@ export class TempCtr extends Component {
assetManager.loadBundle("audio"); assetManager.loadBundle("audio");
CanvasSizeCtr.setContentStrategy(); CanvasSizeCtr.setContentStrategy();
assetManager.loadBundle("sceneBundle", (err, bundle) => { assetManager.loadBundle("sceneBundle", (err, bundle) => {
bundle.loadScene("PasswordMatrix_1", (err_1, scene: Scene) => { bundle.loadScene("VHFillNum_1", (err_1, scene: Scene) => {
if (err_1) { if (err_1) {
log(`加载场景传入的场景名字有错`); log(`加载场景传入的场景名字有错`);
log(err_1); log(err_1);
......
{ {
"__version__": "1.2.8", "__version__": "1.2.8",
"splash-setting": { "splash-setting": {
"url": "C:\\Users\\极客数学帮\\Desktop\\黑色logo.png", "url": "C:\\Users\\极客数学帮\\Desktop\\自定义ccc开始样式\\simpleimg.png",
"displayRatio": 0, "displayRatio": 0.1,
"totalTime": 0, "totalTime": 1000,
"clearColor": { "clearColor": {
"x": 0, "x": 1,
"y": 0, "y": 0.9686274509803922,
"z": 0, "z": 0.8901960784313725,
"w": 1 "w": 1
}, },
"displayWatermark": false "displayWatermark": false
......
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