Commit 849dcd95 authored by unknown's avatar unknown

密码矩阵好了

parent d3961078
......@@ -29,7 +29,7 @@
"_prefab": null,
"autoReleaseAssets": false,
"_globals": {
"__id__": 85
"__id__": 101
},
"_id": "845f6d9b-e827-48a1-b683-47d3cebc3d1b"
},
......@@ -213,21 +213,24 @@
},
{
"__id__": 60
},
{
"__id__": 78
}
],
"_active": true,
"_components": [
{
"__id__": 78
"__id__": 94
},
{
"__id__": 80
"__id__": 96
},
{
"__id__": 82
"__id__": 98
},
{
"__id__": 84
"__id__": 100
}
],
"_prefab": null,
......@@ -315,7 +318,7 @@
"_priority": 1073741824,
"_fov": 45,
"_fovAxis": 0,
"_orthoHeight": 411.7,
"_orthoHeight": 375,
"_near": 1,
"_far": 2000,
"_color": {
......@@ -1694,7 +1697,7 @@
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 527.627,
"x": 525.58,
"y": 211.904,
"z": 0
},
......@@ -1996,7 +1999,7 @@
"_alignFlags": 33,
"_target": null,
"_left": 0,
"_right": 59.37300000000005,
"_right": 61.41999999999996,
"_top": 133.096,
"_bottom": 0,
"_horizontalCenter": 0,
......@@ -2086,17 +2089,427 @@
"handler": "showGameDescView",
"customEventData": ""
},
{
"__type__": "cc.Node",
"_name": "resetBtn",
"_objFlags": 0,
"_parent": {
"__id__": 7
},
"_children": [
{
"__id__": 79
},
{
"__id__": 84
}
],
"_active": true,
"_components": [
{
"__id__": 89
},
{
"__id__": 91
},
{
"__id__": 93
}
],
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 526.58,
"y": -276.219,
"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": "f4/A9pqF5Ao5AlIllC4UcO"
},
{
"__type__": "cc.Node",
"_name": "bgSpr",
"_objFlags": 0,
"_parent": {
"__id__": 78
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 80
},
{
"__id__": 82
}
],
"_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": "4eSSRo0IxP05h0uD4w7pUL"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
"__id__": 79
},
"_enabled": true,
"__prefab": {
"__id__": 81
},
"_contentSize": {
"__type__": "cc.Size",
"width": 120,
"height": 60
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": "74BhWi50BCjpMf+I6vP8ES"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "55pCbtzR5GbojKMArZkfim"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 79
},
"_enabled": true,
"__prefab": {
"__id__": 83
},
"_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": "3bTKp/+9xPaIBxUKUblH1r"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "20UGQn4U9GUoln0NJQTkbG"
},
{
"__type__": "cc.Node",
"_name": "Label",
"_objFlags": 0,
"_parent": {
"__id__": 78
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 85
},
{
"__id__": 87
}
],
"_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": "a4cS55We1FErsGrn+4GPBz"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 84
},
"_enabled": true,
"__prefab": {
"__id__": 86
},
"_contentSize": {
"__type__": "cc.Size",
"width": 80,
"height": 50.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": "92gyUsKMRBIqcVYtmebrdU"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "c68UOAlNhN171Umca6yVvF"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 84
},
"_enabled": true,
"__prefab": {
"__id__": 88
},
"_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": "c5cjh+gs5Bo5BGAFwCiqL/"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "2frm37uaJHQr0AEEaYyM82"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 78
},
"_enabled": true,
"__prefab": {
"__id__": 90
},
"_contentSize": {
"__type__": "cc.Size",
"width": 120,
"height": 60
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": "afqVmihJZHEIY3uouuwgmS"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "55pCbtzR5GbojKMArZkfim"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 78
},
"_enabled": true,
"__prefab": null,
"clickEvents": [
{
"__id__": 92
}
],
"_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": "bb0C6alPFIGrUFbyOK38Ly"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 7
},
"component": "",
"_componentId": "1b7b5dE3PpCc717Chwms56+",
"handler": "onResetBtnClick",
"customEventData": ""
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 78
},
"_enabled": true,
"__prefab": null,
"_alignFlags": 36,
"_target": null,
"_left": 0,
"_right": 80.41999999999996,
"_top": 0,
"_bottom": 68.781,
"_horizontalCenter": 0,
"_verticalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_alignMode": 2,
"_lockFlags": 0,
"_id": "50e3g9mflK76jleIsqF27f"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
},
"_enabled": true,
"__prefab": {
"__id__": 95
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1334,
......@@ -2122,7 +2535,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 81
"__id__": 97
},
"_cameraComponent": {
"__id__": 9
......@@ -2143,7 +2556,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 83
"__id__": 99
},
"_alignFlags": 45,
"_target": null,
......@@ -2207,16 +2620,16 @@
{
"__type__": "cc.SceneGlobals",
"ambient": {
"__id__": 86
"__id__": 102
},
"shadows": {
"__id__": 87
"__id__": 103
},
"_skybox": {
"__id__": 88
"__id__": 104
},
"fog": {
"__id__": 89
"__id__": 105
}
},
{
......
......@@ -151,6 +151,7 @@ export class LatticeBlockadeCtr extends Component {
}
onLineClick(ifo: LineIfo) {
return;
ifo.targSpr.node.destroy();
this.lineArr.splice(this.lineArr.indexOf(ifo), 1);
}
......@@ -169,10 +170,10 @@ export class LatticeBlockadeCtr extends Component {
this.gameState = GAME_STATE.PATH_LINE;
}
else {
this.gameState = GAME_STATE.MARK_LINE;
this.endMarkItemPos = touchItem.getPosIfo();
}
// else {
// this.gameState = GAME_STATE.MARK_LINE;
// this.endMarkItemPos = touchItem.getPosIfo();
// }
}
onTouchMove(event: EventTouch) {
......@@ -363,7 +364,7 @@ export class LatticeBlockadeCtr extends Component {
let item = this.getItem(this.levelData.s_xy[0], this.levelData.s_xy[1])!.target.getComponent(LatticeBlockadeItem)!;
item.setItemColor(new Color(0, 255, 0, 255));
this.pathItemPosArr = [];
this.pathItemPosArr.push(item.getPosIfo())
this.pathItemPosArr.push(item.getPosIfo());
this.getGridIfo();
for (let i = 0; i < this.gridIfoArr.length; ++i) {
let label = this.creNumLabel();
......@@ -375,6 +376,22 @@ export class LatticeBlockadeCtr extends Component {
}
}
onResetBtnClick(){
if (this.gameState == GAME_STATE.READY || this.gameState == GAME_STATE.END || this.gameState == GAME_STATE.PAUSE) {
return;
}
for(let i = 1; i < this.pathItemPosArr.length; ++ i){
this.pathItemPosArr[i].target.getComponent(LatticeBlockadeItem)?.setItemColor(new Color(255, 255, 255, 255));
}
this.pathItemPosArr.splice(1, this.pathItemPosArr.length - 1);
this.endMarkItemPos = null!;
for (let i = 0; i < this.lineArr.length; ++i) {
this.lineArr[i].targSpr.node.destroy();
}
this.lineArr = [];
this.gameState = GAME_STATE.IDLE;
}
setBgSprSize() {
let minWidth = this.column * this.itemWidth + (this.column - 1) * this.itemSpaceX;
let minHeight = this.row * this.itemHeight + (this.row - 1) * this.itemSpaceY;
......
......@@ -321,7 +321,7 @@
"_priority": 1073741824,
"_fov": 45,
"_fovAxis": 0,
"_orthoHeight": 375.00000000000006,
"_orthoHeight": 375,
"_near": 1,
"_far": 2000,
"_color": {
......
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