Commit 93316623 authored by unknown's avatar unknown

纵横填数好了

parent 58110863
......@@ -29,7 +29,7 @@
"_prefab": null,
"autoReleaseAssets": false,
"_globals": {
"__id__": 97
"__id__": 113
},
"_id": "3ad49fde-89b1-44df-a173-4859cc88e56d"
},
......@@ -219,21 +219,24 @@
},
{
"__id__": 72
},
{
"__id__": 90
}
],
"_active": true,
"_components": [
{
"__id__": 90
"__id__": 106
},
{
"__id__": 92
"__id__": 108
},
{
"__id__": 94
"__id__": 110
},
{
"__id__": 96
"__id__": 112
}
],
"_prefab": null,
......@@ -321,7 +324,7 @@
"_priority": 1073741824,
"_fov": 45,
"_fovAxis": 0,
"_orthoHeight": 466.3930510314875,
"_orthoHeight": 375,
"_near": 1,
"_far": 2000,
"_color": {
......@@ -2385,17 +2388,427 @@
"handler": "showGameDescView",
"customEventData": ""
},
{
"__type__": "cc.Node",
"_name": "resetBtn",
"_objFlags": 0,
"_parent": {
"__id__": 7
},
"_children": [
{
"__id__": 91
},
{
"__id__": 96
}
],
"_active": true,
"_components": [
{
"__id__": 101
},
{
"__id__": 103
},
{
"__id__": 105
}
],
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 527.633,
"y": 29.711000000000013,
"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": "16IjukGHxBIKqKrjG69yr2"
},
{
"__type__": "cc.Node",
"_name": "bgSpr",
"_objFlags": 0,
"_parent": {
"__id__": 90
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 92
},
{
"__id__": 94
}
],
"_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": "d9sEeb0TBF9r+yJlXCBE9Q"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
"__id__": 91
},
"_enabled": true,
"__prefab": {
"__id__": 93
},
"_contentSize": {
"__type__": "cc.Size",
"width": 120,
"height": 60
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": "85OYbOaIhF17V3wF9Peit7"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "55pCbtzR5GbojKMArZkfim"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 91
},
"_enabled": true,
"__prefab": {
"__id__": 95
},
"_visFlags": 0,
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 120
},
"_spriteFrame": {
"__uuid__": "7d8f9b89-4fd1-4c9f-a3ab-38ec7cded7ca@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": "cawBjnfmlJD6IT8saxZXmc"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "20UGQn4U9GUoln0NJQTkbG"
},
{
"__type__": "cc.Node",
"_name": "Label",
"_objFlags": 0,
"_parent": {
"__id__": 90
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 97
},
{
"__id__": 99
}
],
"_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": "b25qxOvHNBXZb2Vjukv44/"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 96
},
"_enabled": true,
"__prefab": {
"__id__": 98
},
"_contentSize": {
"__type__": "cc.Size",
"width": 80,
"height": 50.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": "e8kZGLEX5FeJamqI4ZW4UK"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "c68UOAlNhN171Umca6yVvF"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 96
},
"_enabled": true,
"__prefab": {
"__id__": 100
},
"_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": 40,
"_overflow": 0,
"_enableWrapText": true,
"_font": null,
"_isSystemFontUsed": true,
"_isItalic": false,
"_isBold": false,
"_isUnderline": false,
"_underlineHeight": 2,
"_cacheMode": 0,
"_id": "6by2eICI9O1oU/v0ZuMGx2"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "2frm37uaJHQr0AEEaYyM82"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 90
},
"_enabled": true,
"__prefab": {
"__id__": 102
},
"_contentSize": {
"__type__": "cc.Size",
"width": 120,
"height": 60
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": "77Q2VgriNKrLjjzq8BlChg"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "55pCbtzR5GbojKMArZkfim"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 90
},
"_enabled": true,
"__prefab": null,
"clickEvents": [
{
"__id__": 104
}
],
"_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": null,
"_hoverSprite": null,
"_pressedSprite": null,
"_disabledSprite": null,
"_duration": 0.1,
"_zoomScale": 0.85,
"_target": null,
"_id": "8d5I+/r35JqY/2nM1Fb+FG"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 7
},
"component": "",
"_componentId": "98565897FBD5a+inp9Ql6Pb",
"handler": "onResetBtnClick",
"customEventData": ""
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 90
},
"_enabled": true,
"__prefab": null,
"_alignFlags": 33,
"_target": null,
"_left": 0,
"_right": 79.36699999999996,
"_top": 315.289,
"_bottom": 374.711,
"_horizontalCenter": 0,
"_verticalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 60,
"_alignMode": 2,
"_lockFlags": 0,
"_id": "a6ziPu9cpIkoFbFNuddrJM"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
},
"_enabled": true,
"__prefab": {
"__id__": 107
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1334,
......@@ -2421,7 +2834,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 93
"__id__": 109
},
"_cameraComponent": {
"__id__": 9
......@@ -2442,7 +2855,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 95
"__id__": 111
},
"_alignFlags": 45,
"_target": null,
......@@ -2499,16 +2912,16 @@
{
"__type__": "cc.SceneGlobals",
"ambient": {
"__id__": 98
"__id__": 114
},
"shadows": {
"__id__": 99
"__id__": 115
},
"_skybox": {
"__id__": 100
"__id__": 116
},
"fog": {
"__id__": 101
"__id__": 117
}
},
{
......
......@@ -8,6 +8,7 @@ import { viewMgr, VIEW_INDEX } from '../../../../startFolder/script/common/ViewM
import { BeginCountdownView } from '../../commonView/script/BeginCountdownView';
import { ChallengeSuccView } from '../../commonView/script/ChallengeSuccView';
import { GameDescView } from '../../commonView/script/GameDescView';
import { SwitchOkView } from '../../commonView/script/SwitchOkView';
import { VHFillNumCfg, vhfn_lv_1, vhfn_lv_2 } from './VHFillNumCfg';
import { VHFillNumItem, VHFN_ITEM_TYPE } from './VHFillNumItem';
const { ccclass, property } = _decorator;
......@@ -208,13 +209,33 @@ export class VHFillNumCtr extends Component {
return isWin;
}
onResetBtnClick() {
//2022/2/10
if (this.gameState == GAME_STATE.READY || this.gameState == GAME_STATE.END || this.gameState == GAME_STATE.PAUSE) {
return;
}
for (let i = 0; i < this.itemPosIfoArr.length; ++i) {
if (this.itemPosIfoArr[i].target.getComponent(VHFillNumItem)!.itemType == VHFN_ITEM_TYPE.NOR_ELE) {
this.itemPosIfoArr[i].target.getComponent(VHFillNumItem)!.showNum = -1;
}
else if (this.itemPosIfoArr[i].target.getComponent(VHFillNumItem)!.itemType == VHFN_ITEM_TYPE.RESULT) {
this.itemPosIfoArr[i].target.getComponent(VHFillNumItem)!.bgSpr.node.active = false;
}
}
}
gameEnd(isWin: boolean) {
this.gameState = GAME_STATE.END;
if (isWin) {
viewMgr.openView(VIEW_DEF.ChallengeSuccView, (node) => {
AudioMgr.playEffect(succMus);
node?.getComponent(ChallengeSuccView)?.init();
}, VIEW_INDEX.TOP);
AudioMgr.playEffect(succMus);
viewMgr.openView(VIEW_DEF.SwitchOkView, (node) => {
node.getComponent(SwitchOkView)!.endCb = () => {
viewMgr.openView(VIEW_DEF.ChallengeSuccView, (node) => {
node?.getComponent(ChallengeSuccView)?.init();
}, VIEW_INDEX.TOP);
};
node.getComponent(SwitchOkView)?.init(1.5);
});
}
else {
viewMgr.openView(VIEW_DEF.ChallengeFailView, (node) => {
......
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