Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
interactiveGames_Level
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xuxing@jiuaoedu.com
interactiveGames_Level
Commits
2941a6e8
Commit
2941a6e8
authored
Oct 13, 2021
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
锯形数独加入玩法说明
parent
687d2a78
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
1122 additions
and
4 deletions
+1122
-4
GameDescView.prefab
...s/sceneBundle/games/commonView/prefab/GameDescView.prefab
+534
-0
GameDescView.prefab.meta
...neBundle/games/commonView/prefab/GameDescView.prefab.meta
+13
-0
littlePre.meta
assets/sceneBundle/games/commonView/prefab/littlePre.meta
+12
-0
gameDescBtn.prefab
...ndle/games/commonView/prefab/littlePre/gameDescBtn.prefab
+468
-0
gameDescBtn.prefab.meta
...games/commonView/prefab/littlePre/gameDescBtn.prefab.meta
+13
-0
GameDescView.ts
assets/sceneBundle/games/commonView/script/GameDescView.ts
+30
-0
GameDescView.ts.meta
.../sceneBundle/games/commonView/script/GameDescView.ts.meta
+9
-0
Sudoku_1.scene
assets/sceneBundle/games/sudoku/scene/Sudoku_1.scene
+0
-0
SudokuCtr.ts
assets/sceneBundle/games/sudoku/script/SudokuCtr.ts
+33
-3
LevelCfg.ts
assets/startFolder/script/LevelCfg.ts
+2
-1
ViewDef.ts
assets/startFolder/script/common/ViewDef.ts
+8
-0
No files found.
assets/sceneBundle/games/commonView/prefab/GameDescView.prefab
0 → 100644
View file @
2941a6e8
[
{
"__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
assets/sceneBundle/games/commonView/prefab/GameDescView.prefab.meta
0 → 100644
View file @
2941a6e8
{
"ver": "1.1.27",
"importer": "prefab",
"imported": true,
"uuid": "3ef9e1bb-c474-4e08-bf36-e862bf851a4e",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "GameDescView"
}
}
assets/sceneBundle/games/commonView/prefab/littlePre.meta
0 → 100644
View file @
2941a6e8
{
"ver": "1.1.0",
"importer": "directory",
"imported": true,
"uuid": "dfa3f8e6-ed22-44cb-8d55-4d21f0c93d61",
"files": [],
"subMetas": {},
"userData": {
"compressionType": {},
"isRemoteBundle": {}
}
}
assets/sceneBundle/games/commonView/prefab/littlePre/gameDescBtn.prefab
0 → 100644
View file @
2941a6e8
[
{
"__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
assets/sceneBundle/games/commonView/prefab/littlePre/gameDescBtn.prefab.meta
0 → 100644
View file @
2941a6e8
{
"ver": "1.1.27",
"importer": "prefab",
"imported": true,
"uuid": "3fb2bd20-8565-464a-ba85-a8fc30e16eed",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "gameDescBtn"
}
}
assets/sceneBundle/games/commonView/script/GameDescView.ts
0 → 100644
View file @
2941a6e8
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]
// }
}
assets/sceneBundle/games/commonView/script/GameDescView.ts.meta
0 → 100644
View file @
2941a6e8
{
"ver": "4.0.22",
"importer": "typescript",
"imported": true,
"uuid": "2a19778b-eeae-4813-b3b4-273ddc5826b9",
"files": [],
"subMetas": {},
"userData": {}
}
assets/sceneBundle/games/sudoku/scene/Sudoku_1.scene
View file @
2941a6e8
This diff is collapsed.
Click to expand it.
assets/sceneBundle/games/sudoku/script/SudokuCtr.ts
View file @
2941a6e8
...
...
@@ -8,6 +8,7 @@ import { viewMgr, VIEW_INDEX } from '../../../../startFolder/script/common/ViewM
import
{
BeginCountdownView
}
from
'../../commonView/script/BeginCountdownView'
;
import
{
ChallengeFailView
}
from
'../../commonView/script/ChallengeFailView'
;
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
{
SudokuItemCtr
}
from
'./SudokuItemCtr'
;
import
{
SudokuLevelViewCtr
}
from
'./SudokuLevelCtr'
;
...
...
@@ -18,6 +19,7 @@ enum GAME_STATE {
END
=
20
,
FILL
=
30
,
ERASE
=
40
,
PAUSE
=
50
,
}
@
ccclass
(
'SudokuCtr'
)
...
...
@@ -43,6 +45,18 @@ export class SudokuCtr extends Component {
private
costTime
=
0
;
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
)
{
//@ts-ignore
...
...
@@ -55,6 +69,14 @@ export class SudokuCtr extends Component {
//@ts-ignore
this
.
level
=
resData
.
level
;
}
//@ts-ignore
if
(
resData
.
isShowGuide
)
{
//@ts-ignore
this
.
isShowGameDescViewOnce
=
false
;
}
else
{
this
.
isShowGameDescViewOnce
=
true
;
}
}
start
()
{
...
...
@@ -62,18 +84,26 @@ export class SudokuCtr extends Component {
director
.
on
(
"sk_item_click"
,
this
.
onItemClick
,
this
);
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
);
director
.
on
(
"game_desc_close"
,
this
.
onCloseGameDescView
,
this
);
this
.
gameStart
();
}
onResetBtn
(){
onResetBtn
()
{
director
.
emit
(
"resetItem"
);
}
onDestroy
()
{
director
.
off
(
"sk_item_click"
,
this
.
onItemClick
,
this
);
director
.
off
(
"begin_countdown_end"
);
director
.
off
(
"game_desc_close"
,
this
.
onCloseGameDescView
,
this
);
}
onItemClick
(
item
:
SudokuItemCtr
)
{
...
...
@@ -145,7 +175,7 @@ export class SudokuCtr extends Component {
//倒计时
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
;
}
this
.
costTime
+=
dt
;
...
...
assets/startFolder/script/LevelCfg.ts
View file @
2941a6e8
...
...
@@ -942,7 +942,8 @@ export const levelCfg: OneVarLevelItf[] = [
level
:
1
,
resData
:
{
totalTime
:
60
,
level
:
1
level
:
1
,
isShowGuide
:
true
}
}
,
{
...
...
assets/startFolder/script/common/ViewDef.ts
View file @
2941a6e8
...
...
@@ -22,6 +22,8 @@ export interface ViewPathUnitItf {
}
interface
ViewPathItf
{
//玩法说明弹窗
GameDescView
:
ViewPathUnitItf
,
//挑战弹窗
ChallengeFailView
:
ViewPathUnitItf
,
ChallengeSuccView
:
ViewPathUnitItf
,
...
...
@@ -71,6 +73,12 @@ export const VIEW_DEF: ViewPathItf = {
path
:
"test/TestView-001"
,
}
//玩法说明弹窗
,
GameDescView
:
{
bundleName
:
"sceneBundle"
,
path
:
"games/commonView/prefab/GameDescView"
,
}
//挑战弹窗
,
ChallengeFailView
:
{
bundleName
:
"sceneBundle"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment