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": {}
}
...@@ -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", () => {
//引导 //引导
if (!this.isShowGameDescViewOnce) {
this.gameState = GAME_STATE.PAUSE;
this.showGameDescView();
}
else {
this.gameState = GAME_STATE.FILL; 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