Commit 2941a6e8 authored by unknown's avatar unknown

锯形数独加入玩法说明

parent 687d2a78
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false
},
{
"__type__": "cc.Node",
"_name": "GameDescView",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
},
{
"__id__": 13
}
],
"_active": true,
"_components": [
{
"__id__": 19
},
{
"__id__": 21
},
{
"__id__": 23
}
],
"_prefab": {
"__id__": 25
},
"_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": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "bgSpr",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
},
{
"__id__": 5
},
{
"__id__": 7
},
{
"__id__": 9
}
],
"_prefab": {
"__id__": 12
},
"_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": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 4
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1334,
"height": 750
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "55pCbtzR5GbojKMArZkfim"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 6
},
"_visFlags": 0,
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 200
},
"_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": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "20UGQn4U9GUoln0NJQTkbG"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 8
},
"_alignFlags": 45,
"_target": null,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_horizontalCenter": 0,
"_verticalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 100,
"_originalHeight": 100,
"_alignMode": 2,
"_lockFlags": 0,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "422rUzM7BCd7xTyoYh1P+Y"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 10
},
"clickEvents": [
{
"__id__": 11
}
],
"_interactable": true,
"_transition": 0,
"_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__": "7d8f9b89-4fd1-4c9f-a3ab-38ec7cded7ca@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_hoverSprite": null,
"_pressedSprite": null,
"_disabledSprite": null,
"_duration": 0.1,
"_zoomScale": 1.2,
"_target": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "27lmdojSlNCKQH66IMM96f"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 1
},
"component": "",
"_componentId": "2a197eL7q5IE7O0Jz3cWCa5",
"handler": "onClose",
"customEventData": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "19bAJaTvBL7rtRNa8JwkE8"
},
{
"__type__": "cc.Node",
"_name": "descLab",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 14
},
{
"__id__": 16
}
],
"_prefab": {
"__id__": 18
},
"_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": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 13
},
"_enabled": true,
"__prefab": {
"__id__": 15
},
"_contentSize": {
"__type__": "cc.Size",
"width": 160,
"height": 63
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "c68UOAlNhN171Umca6yVvF"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 13
},
"_enabled": true,
"__prefab": {
"__id__": 17
},
"_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": 50,
"_overflow": 0,
"_enableWrapText": true,
"_font": null,
"_isSystemFontUsed": true,
"_isItalic": false,
"_isBold": false,
"_isUnderline": false,
"_underlineHeight": 2,
"_cacheMode": 0,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "2frm37uaJHQr0AEEaYyM82"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "05wKXcEKBNNqOBLO1zf9cJ"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 20
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1334,
"height": 750
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "ceaniOortPxKhZnYSYOQf/"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 22
},
"_alignFlags": 45,
"_target": null,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_horizontalCenter": 0,
"_verticalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 100,
"_originalHeight": 100,
"_alignMode": 2,
"_lockFlags": 0,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "7eQ/JyBiNF2orig2EYYJ9j"
},
{
"__type__": "2a197eL7q5IE7O0Jz3cWCa5",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 24
},
"descLab": {
"__id__": 16
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "86Q5oR9EZLQI+j5V33OTn9"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "16TRbfTzdBe6/EGlGrornR"
}
]
\ No newline at end of file
{
"ver": "1.1.27",
"importer": "prefab",
"imported": true,
"uuid": "3ef9e1bb-c474-4e08-bf36-e862bf851a4e",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "GameDescView"
}
}
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "dfa3f8e6-ed22-44cb-8d55-4d21f0c93d61",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false
},
{
"__type__": "cc.Node",
"_name": "gameDescBtn",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
},
{
"__id__": 8
}
],
"_active": true,
"_components": [
{
"__id__": 14
},
{
"__id__": 16
},
{
"__id__": 18
}
],
"_prefab": {
"__id__": 21
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 527.627,
"y": 211.904,
"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": ""
},
{
"__type__": "cc.Node",
"_name": "bgSpr",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
},
{
"__id__": 5
}
],
"_prefab": {
"__id__": 7
},
"_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": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 4
},
"_contentSize": {
"__type__": "cc.Size",
"width": 160,
"height": 60
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "55pCbtzR5GbojKMArZkfim"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 6
},
"_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": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "20UGQn4U9GUoln0NJQTkbG"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "5fKsmtZ9hM+aFNEjtN/ZDI"
},
{
"__type__": "cc.Node",
"_name": "Label",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 9
},
{
"__id__": 11
}
],
"_prefab": {
"__id__": 13
},
"_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": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
},
"_enabled": true,
"__prefab": {
"__id__": 10
},
"_contentSize": {
"__type__": "cc.Size",
"width": 128,
"height": 50.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "c68UOAlNhN171Umca6yVvF"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
},
"_enabled": true,
"__prefab": {
"__id__": 12
},
"_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": 32,
"_fontSize": 32,
"_fontFamily": "Arial",
"_lineHeight": 40,
"_overflow": 0,
"_enableWrapText": true,
"_font": null,
"_isSystemFontUsed": true,
"_isItalic": false,
"_isBold": false,
"_isUnderline": false,
"_underlineHeight": 2,
"_cacheMode": 0,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "2frm37uaJHQr0AEEaYyM82"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "2dZYZjOhNFm5gg0M7HfyCt"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 15
},
"_contentSize": {
"__type__": "cc.Size",
"width": 160,
"height": 60
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "30AFpV6rhJLKJMbjqrvDLm"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 17
},
"_alignFlags": 33,
"_target": null,
"_left": 0,
"_right": 59.37300000000005,
"_top": 133.096,
"_bottom": 0,
"_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": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "ebKiXA481GJaVCm3yUMRB/"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 19
},
"clickEvents": [
{
"__id__": 20
}
],
"_interactable": true,
"_transition": 0,
"_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": 1.2,
"_target": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "fasaRsl0VPiqKt+O6/ppa2"
},
{
"__type__": "cc.ClickEvent",
"target": null,
"component": "",
"_componentId": "",
"handler": "",
"customEventData": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "1eoK1my11P45N+2n0TgOl/"
}
]
\ No newline at end of file
{
"ver": "1.1.27",
"importer": "prefab",
"imported": true,
"uuid": "3fb2bd20-8565-464a-ba85-a8fc30e16eed",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "gameDescBtn"
}
}
import { _decorator, Component, Node, Label, director } from 'cc';
import { VIEW_DEF } from '../../../../startFolder/script/common/ViewDef';
import { viewMgr } from '../../../../startFolder/script/common/ViewMgr';
const { ccclass, property } = _decorator;
@ccclass('GameDescView')
export class GameDescView extends Component {
@property(Label)
descLab: Label = null!;
start() {
// [3]
}
onClose() {
director.emit("game_desc_close");
viewMgr.closeView(VIEW_DEF.GameDescView);
}
setDesc(text: string) {
this.descLab.string = text;
}
// update (deltaTime: number) {
// // [4]
// }
}
{
"ver": "4.0.22",
"importer": "typescript",
"imported": true,
"uuid": "2a19778b-eeae-4813-b3b4-273ddc5826b9",
"files": [],
"subMetas": {},
"userData": {}
}
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
}, },
{ {
"__type__": "cc.Scene", "__type__": "cc.Scene",
"_name": "Sudoku", "_name": "Sudoku_1",
"_objFlags": 0, "_objFlags": 0,
"_parent": null, "_parent": null,
"_children": [ "_children": [
...@@ -24,17 +24,17 @@ ...@@ -24,17 +24,17 @@
"__id__": 7 "__id__": 7
}, },
{ {
"__id__": 138 "__id__": 156
} }
], ],
"_active": true, "_active": true,
"_components": [], "_components": [],
"_prefab": { "_prefab": {
"__id__": 141 "__id__": 159
}, },
"autoReleaseAssets": false, "autoReleaseAssets": false,
"_globals": { "_globals": {
"__id__": 142 "__id__": 160
}, },
"_id": "2fa5cb6f-32a4-47a2-afd9-b6c3532d1301" "_id": "2fa5cb6f-32a4-47a2-afd9-b6c3532d1301"
}, },
...@@ -215,21 +215,24 @@ ...@@ -215,21 +215,24 @@
}, },
{ {
"__id__": 108 "__id__": 108
},
{
"__id__": 131
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 131 "__id__": 149
}, },
{ {
"__id__": 133 "__id__": 151
}, },
{ {
"__id__": 135 "__id__": 153
}, },
{ {
"__id__": 137 "__id__": 155
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -2510,7 +2513,7 @@ ...@@ -2510,7 +2513,7 @@
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 267.296, "y": 164.899,
"z": 0 "z": 0
}, },
"_lrot": { "_lrot": {
...@@ -3480,17 +3483,439 @@ ...@@ -3480,17 +3483,439 @@
"_lockFlags": 0, "_lockFlags": 0,
"_id": "baJUrvaARPRp+9Xxaeexnd" "_id": "baJUrvaARPRp+9Xxaeexnd"
}, },
{
"__type__": "cc.Node",
"_name": "gameDescBtn",
"_objFlags": 0,
"_parent": {
"__id__": 7
},
"_children": [
{
"__id__": 132
},
{
"__id__": 137
}
],
"_active": true,
"_components": [
{
"__id__": 142
},
{
"__id__": 144
},
{
"__id__": 146
}
],
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 482.278,
"y": 211.904,
"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": "8b0TT15qhHeY6+jU4kJFpb"
},
{
"__type__": "cc.Node",
"_name": "bgSpr",
"_objFlags": 0,
"_parent": {
"__id__": 131
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 133
},
{
"__id__": 135
}
],
"_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": "c4ow8dGEpBEJt5ssc/LdbQ"
},
{ {
"__type__": "cc.UITransform", "__type__": "cc.UITransform",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 7 "__id__": 132
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 134
},
"_contentSize": {
"__type__": "cc.Size",
"width": 160,
"height": 60
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": "2eqsbG0EdP4ZRNgUCTJ6AN"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "55pCbtzR5GbojKMArZkfim"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 132 "__id__": 132
}, },
"_enabled": true,
"__prefab": {
"__id__": 136
},
"_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": "eaMAxjYc5G3J9bMr3NAzrj"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "20UGQn4U9GUoln0NJQTkbG"
},
{
"__type__": "cc.Node",
"_name": "Label",
"_objFlags": 0,
"_parent": {
"__id__": 131
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 138
},
{
"__id__": 140
}
],
"_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": "93l7tkcRpJGpkZzE68aGh4"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 137
},
"_enabled": true,
"__prefab": {
"__id__": 139
},
"_contentSize": {
"__type__": "cc.Size",
"width": 128,
"height": 50.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": "67MCrSoHRK3rWekMYusGn9"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "c68UOAlNhN171Umca6yVvF"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 137
},
"_enabled": true,
"__prefab": {
"__id__": 141
},
"_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": 32,
"_fontSize": 32,
"_fontFamily": "Arial",
"_lineHeight": 40,
"_overflow": 0,
"_enableWrapText": true,
"_font": null,
"_isSystemFontUsed": true,
"_isItalic": false,
"_isBold": false,
"_isUnderline": false,
"_underlineHeight": 2,
"_cacheMode": 0,
"_id": "03nUSagGRDL4eAptF7cSHW"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "2frm37uaJHQr0AEEaYyM82"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 131
},
"_enabled": true,
"__prefab": {
"__id__": 143
},
"_contentSize": {
"__type__": "cc.Size",
"width": 160,
"height": 60
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": "83Qgx+Tc9Mqa+rTjxx5FnZ"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "30AFpV6rhJLKJMbjqrvDLm"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 131
},
"_enabled": true,
"__prefab": {
"__id__": 145
},
"_alignFlags": 33,
"_target": null,
"_left": 0,
"_right": 104.72199999999998,
"_top": 133.096,
"_bottom": 0,
"_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": "c6sSRUw6REeaxZE9szjwfP"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "ebKiXA481GJaVCm3yUMRB/"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 131
},
"_enabled": true,
"__prefab": {
"__id__": 147
},
"clickEvents": [
{
"__id__": 148
}
],
"_interactable": true,
"_transition": 0,
"_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": 1.2,
"_target": null,
"_id": "66Hw1bvc1DFogVs6/hZoH0"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "fasaRsl0VPiqKt+O6/ppa2"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 7
},
"component": "",
"_componentId": "028ac43h3tHd4EX1Yzc4tdg",
"handler": "showGameDescView",
"customEventData": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
},
"_enabled": true,
"__prefab": {
"__id__": 150
},
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 1334, "width": 1334,
...@@ -3516,7 +3941,7 @@ ...@@ -3516,7 +3941,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 134 "__id__": 152
}, },
"_cameraComponent": { "_cameraComponent": {
"__id__": 9 "__id__": 9
...@@ -3537,7 +3962,7 @@ ...@@ -3537,7 +3962,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 136 "__id__": 154
}, },
"_alignFlags": 45, "_alignFlags": 45,
"_target": null, "_target": null,
...@@ -3595,10 +4020,10 @@ ...@@ -3595,10 +4020,10 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 139 "__id__": 157
}, },
{ {
"__id__": 140 "__id__": 158
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -3635,7 +4060,7 @@ ...@@ -3635,7 +4060,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 138 "__id__": 156
}, },
"_enabled": true, "_enabled": true,
"__prefab": null, "__prefab": null,
...@@ -3650,12 +4075,12 @@ ...@@ -3650,12 +4075,12 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 138 "__id__": 156
}, },
"_enabled": true, "_enabled": true,
"__prefab": null, "__prefab": null,
"audioSource": { "audioSource": {
"__id__": 139 "__id__": 157
}, },
"_id": "43XyqKQo1PPp8jStX535Q5" "_id": "43XyqKQo1PPp8jStX535Q5"
}, },
...@@ -3667,16 +4092,16 @@ ...@@ -3667,16 +4092,16 @@
{ {
"__type__": "cc.SceneGlobals", "__type__": "cc.SceneGlobals",
"ambient": { "ambient": {
"__id__": 143 "__id__": 161
}, },
"shadows": { "shadows": {
"__id__": 144 "__id__": 162
}, },
"_skybox": { "_skybox": {
"__id__": 145 "__id__": 163
}, },
"fog": { "fog": {
"__id__": 146 "__id__": 164
} }
}, },
{ {
......
...@@ -8,6 +8,7 @@ import { viewMgr, VIEW_INDEX } from '../../../../startFolder/script/common/ViewM ...@@ -8,6 +8,7 @@ import { viewMgr, VIEW_INDEX } from '../../../../startFolder/script/common/ViewM
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 { GameDescView } from '../../commonView/script/GameDescView';
import { SK_LV_1, SK_LV_2, SK_LV_3, SK_LV_4 } from './SudokuCfg'; import { SK_LV_1, SK_LV_2, SK_LV_3, SK_LV_4 } from './SudokuCfg';
import { SudokuItemCtr } from './SudokuItemCtr'; import { SudokuItemCtr } from './SudokuItemCtr';
import { SudokuLevelViewCtr } from './SudokuLevelCtr'; import { SudokuLevelViewCtr } from './SudokuLevelCtr';
...@@ -18,6 +19,7 @@ enum GAME_STATE { ...@@ -18,6 +19,7 @@ enum GAME_STATE {
END = 20, END = 20,
FILL = 30, FILL = 30,
ERASE = 40, ERASE = 40,
PAUSE = 50,
} }
@ccclass('SudokuCtr') @ccclass('SudokuCtr')
...@@ -43,6 +45,18 @@ export class SudokuCtr extends Component { ...@@ -43,6 +45,18 @@ export class SudokuCtr extends Component {
private costTime = 0; private costTime = 0;
private isPlayCountdownMus = false; private isPlayCountdownMus = false;
private isShowGameDescViewOnce = false;
showGameDescView() {
viewMgr.openView(VIEW_DEF.GameDescView, (node) => {
node.getComponent(GameDescView)?.setDesc("填入数字使同行、同列不存在相同数字,\n同种颜色的格子里也不要出现相同数字。\n如果填入数字错误可以使用橡皮擦擦掉数字,\n也可点击还原按钮直接恢复最初状态。");
});
}
onCloseGameDescView() {
this.gameState = GAME_STATE.FILL;
}
setGameData(resData: object) { setGameData(resData: object) {
//@ts-ignore //@ts-ignore
...@@ -55,6 +69,14 @@ export class SudokuCtr extends Component { ...@@ -55,6 +69,14 @@ export class SudokuCtr extends Component {
//@ts-ignore //@ts-ignore
this.level = resData.level; this.level = resData.level;
} }
//@ts-ignore
if (resData.isShowGuide) {
//@ts-ignore
this.isShowGameDescViewOnce = false;
}
else{
this.isShowGameDescViewOnce = true;
}
} }
start() { start() {
...@@ -62,18 +84,26 @@ export class SudokuCtr extends Component { ...@@ -62,18 +84,26 @@ export class SudokuCtr extends Component {
director.on("sk_item_click", this.onItemClick, this); director.on("sk_item_click", this.onItemClick, this);
director.on("begin_countdown_end", () => { director.on("begin_countdown_end", () => {
//引导 //引导
this.gameState = GAME_STATE.FILL; if (!this.isShowGameDescViewOnce) {
this.gameState = GAME_STATE.PAUSE;
this.showGameDescView();
}
else {
this.gameState = GAME_STATE.FILL;
}
}, this); }, this);
director.on("game_desc_close", this.onCloseGameDescView, this);
this.gameStart(); this.gameStart();
} }
onResetBtn(){ onResetBtn() {
director.emit("resetItem"); director.emit("resetItem");
} }
onDestroy() { onDestroy() {
director.off("sk_item_click", this.onItemClick, this); director.off("sk_item_click", this.onItemClick, this);
director.off("begin_countdown_end"); director.off("begin_countdown_end");
director.off("game_desc_close", this.onCloseGameDescView, this);
} }
onItemClick(item: SudokuItemCtr) { onItemClick(item: SudokuItemCtr) {
...@@ -145,7 +175,7 @@ export class SudokuCtr extends Component { ...@@ -145,7 +175,7 @@ export class SudokuCtr extends Component {
//倒计时 //倒计时
countdownTime(dt: number) { countdownTime(dt: number) {
if (this.gameState == GAME_STATE.READY || this.gameState == GAME_STATE.END) { if (this.gameState == GAME_STATE.READY || this.gameState == GAME_STATE.END || this.gameState == GAME_STATE.PAUSE) {
return; return;
} }
this.costTime += dt; this.costTime += dt;
......
...@@ -942,7 +942,8 @@ export const levelCfg: OneVarLevelItf[] = [ ...@@ -942,7 +942,8 @@ export const levelCfg: OneVarLevelItf[] = [
level: 1, level: 1,
resData: { resData: {
totalTime: 60, totalTime: 60,
level: 1 level: 1,
isShowGuide: true
} }
} }
, { , {
......
...@@ -22,6 +22,8 @@ export interface ViewPathUnitItf { ...@@ -22,6 +22,8 @@ export interface ViewPathUnitItf {
} }
interface ViewPathItf { interface ViewPathItf {
//玩法说明弹窗
GameDescView: ViewPathUnitItf,
//挑战弹窗 //挑战弹窗
ChallengeFailView: ViewPathUnitItf, ChallengeFailView: ViewPathUnitItf,
ChallengeSuccView: ViewPathUnitItf, ChallengeSuccView: ViewPathUnitItf,
...@@ -71,6 +73,12 @@ export const VIEW_DEF: ViewPathItf = { ...@@ -71,6 +73,12 @@ export const VIEW_DEF: ViewPathItf = {
path: "test/TestView-001", path: "test/TestView-001",
} }
//玩法说明弹窗
, GameDescView: {
bundleName: "sceneBundle",
path: "games/commonView/prefab/GameDescView",
}
//挑战弹窗 //挑战弹窗
, ChallengeFailView: { , ChallengeFailView: {
bundleName: "sceneBundle", bundleName: "sceneBundle",
......
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