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
e5f8d0d4
Commit
e5f8d0d4
authored
Nov 26, 2021
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
环形幻方好了
parent
34d16b90
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
2021 additions
and
66 deletions
+2021
-66
数字底框.png.meta
assets/sceneBundle/games/ringSum/image/数字底框.png.meta
+4
-4
时间框.png
assets/sceneBundle/games/ringSum/image/时间框.png
+0
-0
时间框.png.meta
assets/sceneBundle/games/ringSum/image/时间框.png.meta
+74
-0
RingSumDescView.prefab
...s/sceneBundle/games/ringSum/prefab/RingSumDescView.prefab
+1593
-0
RingSumDescView.prefab.meta
...neBundle/games/ringSum/prefab/RingSumDescView.prefab.meta
+13
-0
RingSum_1.scene
assets/sceneBundle/games/ringSum/scene/RingSum_1.scene
+0
-0
RingSum_1.scene.meta
assets/sceneBundle/games/ringSum/scene/RingSum_1.scene.meta
+0
-0
RingSumCircle.ts
assets/sceneBundle/games/ringSum/script/RingSumCircle.ts
+45
-25
RingSumCtr.ts
assets/sceneBundle/games/ringSum/script/RingSumCtr.ts
+181
-18
RingSumDescView.ts
assets/sceneBundle/games/ringSum/script/RingSumDescView.ts
+23
-0
RingSumDescView.ts.meta
.../sceneBundle/games/ringSum/script/RingSumDescView.ts.meta
+9
-0
RingSumItem.ts
assets/sceneBundle/games/ringSum/script/RingSumItem.ts
+10
-4
LevelCfg.ts
assets/startFolder/script/LevelCfg.ts
+20
-1
LevelHomeCtr.ts
assets/startFolder/script/LevelHomeCtr.ts
+1
-1
SceneDef.ts
assets/startFolder/script/common/SceneDef.ts
+7
-0
Utils.ts
assets/startFolder/script/common/Utils.ts
+29
-11
ViewDef.ts
assets/startFolder/script/common/ViewDef.ts
+8
-0
engine.json
settings/v2/packages/engine.json
+4
-2
No files found.
assets/sceneBundle/games/ringSum/image/数字底框.png.meta
View file @
e5f8d0d4
...
@@ -49,10 +49,10 @@
...
@@ -49,10 +49,10 @@
"height": 70,
"height": 70,
"rawWidth": 60,
"rawWidth": 60,
"rawHeight": 70,
"rawHeight": 70,
"borderTop":
0
,
"borderTop":
19
,
"borderBottom":
0
,
"borderBottom":
24
,
"borderLeft":
0
,
"borderLeft":
13
,
"borderRight":
0
,
"borderRight":
15
,
"packable": true,
"packable": true,
"isUuid": true,
"isUuid": true,
"imageUuidOrDatabaseUri": "32352b85-d1e1-47d4-bc9f-deb0ceb85759@6c48a",
"imageUuidOrDatabaseUri": "32352b85-d1e1-47d4-bc9f-deb0ceb85759@6c48a",
...
...
assets/sceneBundle/games/ringSum/image/时间框.png
0 → 100644
View file @
e5f8d0d4
1.98 KB
assets/sceneBundle/games/ringSum/image/时间框.png.meta
0 → 100644
View file @
e5f8d0d4
{
"ver": "1.0.21",
"importer": "image",
"imported": true,
"uuid": "33205c54-458f-4cfa-beb3-5820777d8f18",
"files": [
".png",
".json"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "33205c54-458f-4cfa-beb3-5820777d8f18@6c48a",
"displayName": "时间框",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0,
"isUuid": true,
"imageUuidOrDatabaseUri": "33205c54-458f-4cfa-beb3-5820777d8f18"
},
"ver": "1.0.21",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "33205c54-458f-4cfa-beb3-5820777d8f18@f9941",
"displayName": "时间框",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 376,
"height": 69,
"rawWidth": 376,
"rawHeight": 69,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"isUuid": true,
"imageUuidOrDatabaseUri": "33205c54-458f-4cfa-beb3-5820777d8f18@6c48a",
"atlasUuid": ""
},
"ver": "1.0.9",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"hasAlpha": true,
"type": "sprite-frame",
"redirect": "33205c54-458f-4cfa-beb3-5820777d8f18@f9941"
}
}
assets/sceneBundle/games/ringSum/prefab/RingSumDescView.prefab
0 → 100644
View file @
e5f8d0d4
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false
},
{
"__type__": "cc.Node",
"_name": "RingSumDescView",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
},
{
"__id__": 13
},
{
"__id__": 19
},
{
"__id__": 25
},
{
"__id__": 31
},
{
"__id__": 37
},
{
"__id__": 43
},
{
"__id__": 49
},
{
"__id__": 55
},
{
"__id__": 61
}
],
"_active": true,
"_components": [
{
"__id__": 67
},
{
"__id__": 69
},
{
"__id__": 71
}
],
"_prefab": {
"__id__": 73
},
"_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": false,
"_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.Node",
"_name": "样式1",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 20
},
{
"__id__": 22
}
],
"_prefab": {
"__id__": 24
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -472.322,
"y": 208.524,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 0.4,
"y": 0.4,
"z": 1
},
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 19
},
"_enabled": true,
"__prefab": {
"__id__": 21
},
"_contentSize": {
"__type__": "cc.Size",
"width": 452,
"height": 456
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "f7NISe7HdAD68SLfhnddy8"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 19
},
"_enabled": true,
"__prefab": {
"__id__": 23
},
"_visFlags": 0,
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "61717b78-6dc4-4500-986a-b7b5ca4c7bd2@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 1,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "e71ctEmpxFC4KlSYRZNz/a"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "1a3l5hBOVDUoxvJbRf4iDP"
},
{
"__type__": "cc.Node",
"_name": "样式2",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 26
},
{
"__id__": 28
}
],
"_prefab": {
"__id__": 30
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -472.322,
"y": 17.585,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 0.4,
"y": 0.4,
"z": 1
},
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 25
},
"_enabled": true,
"__prefab": {
"__id__": 27
},
"_contentSize": {
"__type__": "cc.Size",
"width": 452,
"height": 452
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "f7NISe7HdAD68SLfhnddy8"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 25
},
"_enabled": true,
"__prefab": {
"__id__": 29
},
"_visFlags": 0,
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "4e78b526-6b0c-48db-b434-599da9eed13b@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 1,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "e71ctEmpxFC4KlSYRZNz/a"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "7aZYuhPl5Efb6rRavtoszc"
},
{
"__type__": "cc.Node",
"_name": "样式3",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 32
},
{
"__id__": 34
}
],
"_prefab": {
"__id__": 36
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -472.322,
"y": -175.439,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 0.4,
"y": 0.4,
"z": 1
},
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 31
},
"_enabled": true,
"__prefab": {
"__id__": 33
},
"_contentSize": {
"__type__": "cc.Size",
"width": 452,
"height": 452
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "f7NISe7HdAD68SLfhnddy8"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 31
},
"_enabled": true,
"__prefab": {
"__id__": 35
},
"_visFlags": 0,
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "b74c0c5f-7c05-4063-9fe4-da16196ec014@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 1,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "e71ctEmpxFC4KlSYRZNz/a"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "3ch5sz18dH654Bt64t9smg"
},
{
"__type__": "cc.Node",
"_name": "titleLab",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 38
},
{
"__id__": 40
}
],
"_prefab": {
"__id__": 42
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 332.512,
"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__": 37
},
"_enabled": true,
"__prefab": {
"__id__": 39
},
"_contentSize": {
"__type__": "cc.Size",
"width": 160,
"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__": 37
},
"_enabled": true,
"__prefab": {
"__id__": 41
},
"_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": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "2frm37uaJHQr0AEEaYyM82"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "97fuslcbNO1IRunm/FgNcx"
},
{
"__type__": "cc.Node",
"_name": "desc-001",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 44
},
{
"__id__": 46
}
],
"_prefab": {
"__id__": 48
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -347.045,
"y": 208.246,
"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__": 43
},
"_enabled": true,
"__prefab": {
"__id__": 45
},
"_contentSize": {
"__type__": "cc.Size",
"width": 930,
"height": 50.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "c7XyCl3IpFnJ1BVcxsvbWd"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 43
},
"_enabled": true,
"__prefab": {
"__id__": 47
},
"_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": 30,
"_fontSize": 30,
"_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": "ccntBO5pJPVok3fByW5Yqi"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "367VLH8DFLJ5yx7MH7hkqQ"
},
{
"__type__": "cc.Node",
"_name": "desc-002",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 50
},
{
"__id__": 52
}
],
"_prefab": {
"__id__": 54
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -347.045,
"y": 6.169,
"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__": 49
},
"_enabled": true,
"__prefab": {
"__id__": 51
},
"_contentSize": {
"__type__": "cc.Size",
"width": 960,
"height": 50.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "0fT57rPe5KWIzOKEh2l0mX"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 49
},
"_enabled": true,
"__prefab": {
"__id__": 53
},
"_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": 30,
"_fontSize": 30,
"_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": "8ewk96J/5JHIefExlhGxB8"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "e511zAaSVEcY7m9HzIoAya"
},
{
"__type__": "cc.Node",
"_name": "desc-003",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 56
},
{
"__id__": 58
}
],
"_prefab": {
"__id__": 60
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -347.045,
"y": -187.122,
"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__": 55
},
"_enabled": true,
"__prefab": {
"__id__": 57
},
"_contentSize": {
"__type__": "cc.Size",
"width": 720,
"height": 50.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "e452XsprJD35950xB8x11N"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 55
},
"_enabled": true,
"__prefab": {
"__id__": 59
},
"_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": 30,
"_fontSize": 30,
"_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": "8a3ib29gpKnYgNwecHtJww"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "f1II68FttIFZ4anQpdAQJE"
},
{
"__type__": "cc.Node",
"_name": "desc-004",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 62
},
{
"__id__": 64
}
],
"_prefab": {
"__id__": 66
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -347.045,
"y": -317.447,
"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__": 61
},
"_enabled": true,
"__prefab": {
"__id__": 63
},
"_contentSize": {
"__type__": "cc.Size",
"width": 600,
"height": 50.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "c5PA1qKFJB9aqPafRr0EjT"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 61
},
"_enabled": true,
"__prefab": {
"__id__": 65
},
"_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": 30,
"_fontSize": 30,
"_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": "4brXxGopBJ6I6O2JbgH+wT"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "c3Dne191FGMLfthEzkTZq+"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 68
},
"_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__": 70
},
"_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__": "d5b39766INDZq6slJKQ5DA/",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 72
},
"descLab": {
"__id__": 16
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "ef3Nn89IpOGa8QnyIO1Joq"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "16TRbfTzdBe6/EGlGrornR"
}
]
\ No newline at end of file
assets/sceneBundle/games/ringSum/prefab/RingSumDescView.prefab.meta
0 → 100644
View file @
e5f8d0d4
{
"ver": "1.1.27",
"importer": "prefab",
"imported": true,
"uuid": "d0cc203a-0103-4b11-9fb0-6b0ab982aa73",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "RingSumDescView"
}
}
assets/sceneBundle/games/ringSum/scene/RingSum.scene
→
assets/sceneBundle/games/ringSum/scene/RingSum
_1
.scene
View file @
e5f8d0d4
This source diff could not be displayed because it is too large. You can
view the blob
instead.
assets/sceneBundle/games/ringSum/scene/RingSum.scene.meta
→
assets/sceneBundle/games/ringSum/scene/RingSum
_1
.scene.meta
View file @
e5f8d0d4
File moved
assets/sceneBundle/games/ringSum/script/RingSumCircle.ts
View file @
e5f8d0d4
import
{
_decorator
,
Component
,
Node
}
from
'cc'
;
import
{
_decorator
,
Component
,
Node
,
EventTouch
,
UITransform
,
v3
,
v2
,
director
}
from
'cc'
;
import
{
RingSumItem
,
RS_ITEM_TYPE
}
from
'./RingSumItem'
;
import
{
RingSumItem
,
RS_ITEM_TYPE
}
from
'./RingSumItem'
;
const
{
ccclass
,
property
}
=
_decorator
;
const
{
ccclass
,
property
}
=
_decorator
;
@
ccclass
(
'RingSumCircle'
)
@
ccclass
(
'RingSumCircle'
)
export
class
RingSumCircle
extends
Component
{
export
class
RingSumCircle
extends
Component
{
@
property
(
Node
)
@
property
(
Node
)
itemArrNode
:
Node
=
null
!
;
itemArrNode
:
Node
=
null
!
;
private
itemArr
:
RingSumItem
[][]
=
[];
private
itemArr
:
RingSumItem
[][]
=
[];
onLoad
(){
onLoad
()
{
let
items
=
this
.
itemArrNode
.
getComponentsInChildren
(
RingSumItem
);
let
items
=
this
.
itemArrNode
.
getComponentsInChildren
(
RingSumItem
);
this
.
itemArr
=
[
this
.
itemArr
=
[
[
items
[
0
],
items
[
1
],
items
[
2
]],
[
items
[
0
],
items
[
1
],
items
[
2
]],
...
@@ -20,20 +20,20 @@ export class RingSumCircle extends Component {
...
@@ -20,20 +20,20 @@ export class RingSumCircle extends Component {
];
];
}
}
start
()
{
start
()
{
// [3]
// [3]
this
.
node
.
on
(
Node
.
EventType
.
TOUCH_END
,
this
.
onClick
,
this
);
}
}
setAllText
(
texts
:
string
[][]){
setAllText
(
texts
:
string
[][])
{
for
(
let
i
=
0
;
i
<
texts
.
length
;
++
i
)
{
for
(
let
i
=
0
;
i
<
texts
.
length
;
++
i
)
{
for
(
let
j
=
0
;
j
<
texts
[
i
].
length
;
++
j
)
{
for
(
let
j
=
0
;
j
<
texts
[
i
].
length
;
++
j
)
{
this
.
itemArr
[
i
][
j
].
setText
(
texts
[
i
][
j
]);
this
.
itemArr
[
i
][
j
].
setText
(
texts
[
i
][
j
]);
}
}
}
}
}
}
getAllText
(){
getAllText
()
{
return
[
return
[
[
this
.
itemArr
[
0
][
0
].
getText
(),
this
.
itemArr
[
0
][
1
].
getText
(),
this
.
itemArr
[
0
][
2
].
getText
()],
[
this
.
itemArr
[
0
][
0
].
getText
(),
this
.
itemArr
[
0
][
1
].
getText
(),
this
.
itemArr
[
0
][
2
].
getText
()],
[
this
.
itemArr
[
1
][
0
].
getText
(),
this
.
itemArr
[
1
][
1
].
getText
(),
this
.
itemArr
[
1
][
2
].
getText
()],
[
this
.
itemArr
[
1
][
0
].
getText
(),
this
.
itemArr
[
1
][
1
].
getText
(),
this
.
itemArr
[
1
][
2
].
getText
()],
...
@@ -41,15 +41,15 @@ export class RingSumCircle extends Component {
...
@@ -41,15 +41,15 @@ export class RingSumCircle extends Component {
];
];
}
}
setAllItemType
(
itemTypes
:
RS_ITEM_TYPE
[][]){
setAllItemType
(
itemTypes
:
RS_ITEM_TYPE
[][])
{
for
(
let
i
=
0
;
i
<
itemTypes
.
length
;
++
i
)
{
for
(
let
i
=
0
;
i
<
itemTypes
.
length
;
++
i
)
{
for
(
let
j
=
0
;
j
<
itemTypes
[
i
].
length
;
++
j
)
{
for
(
let
j
=
0
;
j
<
itemTypes
[
i
].
length
;
++
j
)
{
this
.
itemArr
[
i
][
j
].
setItemType
(
itemTypes
[
i
][
j
]);
this
.
itemArr
[
i
][
j
].
setItemType
(
itemTypes
[
i
][
j
]);
}
}
}
}
}
}
getAllItemType
(){
getAllItemType
()
{
return
[
return
[
[
this
.
itemArr
[
0
][
0
].
getItemType
(),
this
.
itemArr
[
0
][
1
].
getItemType
(),
this
.
itemArr
[
0
][
2
].
getItemType
()],
[
this
.
itemArr
[
0
][
0
].
getItemType
(),
this
.
itemArr
[
0
][
1
].
getItemType
(),
this
.
itemArr
[
0
][
2
].
getItemType
()],
[
this
.
itemArr
[
1
][
0
].
getItemType
(),
this
.
itemArr
[
1
][
1
].
getItemType
(),
this
.
itemArr
[
1
][
2
].
getItemType
()],
[
this
.
itemArr
[
1
][
0
].
getItemType
(),
this
.
itemArr
[
1
][
1
].
getItemType
(),
this
.
itemArr
[
1
][
2
].
getItemType
()],
...
@@ -57,33 +57,33 @@ export class RingSumCircle extends Component {
...
@@ -57,33 +57,33 @@ export class RingSumCircle extends Component {
];
];
}
}
hideAllNorItemText
(){
hideAllNorItemText
()
{
for
(
let
i
=
0
;
i
<
this
.
itemArr
.
length
;
++
i
)
{
for
(
let
i
=
0
;
i
<
this
.
itemArr
.
length
;
++
i
)
{
for
(
let
j
=
0
;
j
<
this
.
itemArr
[
i
].
length
;
++
j
)
{
for
(
let
j
=
0
;
j
<
this
.
itemArr
[
i
].
length
;
++
j
)
{
if
(
this
.
itemArr
[
i
][
j
].
getItemType
()
==
RS_ITEM_TYPE
.
NOR
)
this
.
itemArr
[
i
][
j
].
setText
(
""
);
if
(
this
.
itemArr
[
i
][
j
].
getItemType
()
==
RS_ITEM_TYPE
.
NOR
)
this
.
itemArr
[
i
][
j
].
setText
(
""
);
}
}
}
}
}
}
checkRepeat
(){
checkRepeat
()
{
let
isRepeat
=
false
;
let
isRepeat
=
false
;
let
countMap
:
Map
<
string
,
RingSumItem
[]
>
=
new
Map
<
string
,
RingSumItem
[]
>
();
let
countMap
:
Map
<
string
,
RingSumItem
[]
>
=
new
Map
<
string
,
RingSumItem
[]
>
();
for
(
let
i
=
0
;
i
<
this
.
itemArr
.
length
;
++
i
)
{
for
(
let
i
=
0
;
i
<
this
.
itemArr
.
length
;
++
i
)
{
for
(
let
j
=
0
;
i
<
this
.
itemArr
[
i
].
length
;
++
j
)
{
for
(
let
j
=
0
;
j
<
this
.
itemArr
[
i
].
length
;
++
j
)
{
this
.
itemArr
[
i
][
j
].
setNoRepLabColor
();
this
.
itemArr
[
i
][
j
].
setNoRepLabColor
();
if
(
countMap
.
get
(
this
.
itemArr
[
i
][
j
].
getText
()))
{
if
(
countMap
.
get
(
this
.
itemArr
[
i
][
j
].
getText
()))
{
countMap
.
get
(
this
.
itemArr
[
i
][
j
].
getText
())?.
push
(
this
.
itemArr
[
i
][
j
]);
countMap
.
get
(
this
.
itemArr
[
i
][
j
].
getText
())?.
push
(
this
.
itemArr
[
i
][
j
]);
}
}
else
{
else
{
countMap
.
set
(
this
.
itemArr
[
i
][
j
].
getText
(),
[
this
.
itemArr
[
i
][
j
]]);
countMap
.
set
(
this
.
itemArr
[
i
][
j
].
getText
(),
[
this
.
itemArr
[
i
][
j
]]);
}
}
}
}
}
}
countMap
.
forEach
((
value
,
key
)
=>
{
countMap
.
forEach
((
value
,
key
)
=>
{
if
(
value
.
length
>
1
)
{
if
(
value
.
length
>
1
)
{
isRepeat
=
true
;
isRepeat
=
true
;
if
(
key
!=
""
)
{
if
(
key
!=
""
)
{
for
(
let
i
=
0
;
i
<
value
.
length
;
++
i
)
{
for
(
let
i
=
0
;
i
<
value
.
length
;
++
i
)
{
value
[
i
].
setRepLabColor
();
value
[
i
].
setRepLabColor
();
}
}
}
}
...
@@ -92,6 +92,26 @@ export class RingSumCircle extends Component {
...
@@ -92,6 +92,26 @@ export class RingSumCircle extends Component {
return
isRepeat
;
return
isRepeat
;
}
}
onClick
(
event
:
EventTouch
)
{
for
(
let
i
=
0
;
i
<
this
.
itemArr
.
length
;
++
i
)
{
for
(
let
j
=
0
;
j
<
this
.
itemArr
.
length
;
++
j
)
{
let
point
=
this
.
itemArr
[
i
][
j
].
node
.
getComponent
(
UITransform
)?.
convertToNodeSpaceAR
(
v3
(
event
.
getUILocation
().
x
,
event
.
getUILocation
().
y
));
if
(
this
.
itemArr
[
i
][
j
].
isTouch
(
v2
(
point
?.
x
,
point
?.
y
)))
{
director
.
emit
(
"rsitem_click"
,
this
.
itemArr
[
i
][
j
]);
}
}
}
}
reset
(){
for
(
let
i
=
0
;
i
<
this
.
itemArr
.
length
;
++
i
)
{
for
(
let
j
=
0
;
j
<
this
.
itemArr
.
length
;
++
j
)
{
this
.
itemArr
[
i
][
j
].
setNoRepLabColor
();
this
.
itemArr
[
i
][
j
].
selSpr
.
node
.
active
=
false
;
}
}
}
// update (deltaTime: number) {
// update (deltaTime: number) {
// // [4]
// // [4]
// }
// }
...
...
assets/sceneBundle/games/ringSum/script/RingSumCtr.ts
View file @
e5f8d0d4
import
{
_decorator
,
Component
,
Node
}
from
'cc'
;
import
{
_decorator
,
Component
,
Node
,
director
,
Label
,
CCFloat
}
from
'cc'
;
import
{
countdownMus
,
failMus
,
succMus
}
from
'../../../../startFolder/script/common/AudioDef'
;
import
{
AudioMgr
}
from
'../../../../startFolder/script/common/AudioMgr'
;
import
{
Utils
}
from
'../../../../startFolder/script/common/Utils'
;
import
{
VIEW_DEF
}
from
'../../../../startFolder/script/common/ViewDef'
;
import
{
viewMgr
,
VIEW_INDEX
}
from
'../../../../startFolder/script/common/ViewMgr'
;
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
{
RingSumCfg
,
RS_LV_1
}
from
'./RingSumCfg'
;
import
{
RingSumCfg
,
RS_LV_1
}
from
'./RingSumCfg'
;
import
{
RingSumCircle
}
from
'./RingSumCircle'
;
import
{
RingSumCircle
}
from
'./RingSumCircle'
;
import
{
RingSumItem
}
from
'./RingSumItem'
;
import
{
RingSumItem
,
RS_ITEM_TYPE
}
from
'./RingSumItem'
;
const
{
ccclass
,
property
}
=
_decorator
;
const
{
ccclass
,
property
}
=
_decorator
;
enum
GAME_STATE
{
enum
GAME_STATE
{
READY
=
10
,
READY
=
10
,
END
=
20
,
RUN
=
20
,
PAUSE
=
30
,
END
=
30
,
IDLE
=
40
,
PAUSE
=
40
,
INPUT
=
50
}
}
@
ccclass
(
'RingSumCtr'
)
@
ccclass
(
'RingSumCtr'
)
...
@@ -19,19 +27,88 @@ export class RingSumCtr extends Component {
...
@@ -19,19 +27,88 @@ export class RingSumCtr extends Component {
@
property
(
RingSumCircle
)
@
property
(
RingSumCircle
)
circle
:
RingSumCircle
=
null
!
;
circle
:
RingSumCircle
=
null
!
;
@
property
(
Label
)
countdownLab
:
Label
=
null
!
;
@
property
(
CCFloat
)
totalTime
:
number
=
0
;
private
level
=
2
;
private
level
=
2
;
private
levelData
:
RingSumCfg
=
null
!
;
private
levelData
:
RingSumCfg
=
null
!
;
start
()
{
private
orgItemData
=
""
;
private
curRSItem
:
RingSumItem
=
null
!
;
private
gameState
=
GAME_STATE
.
READY
;
private
costTime
=
0
;
private
isPlayCountdownMus
=
false
;
private
isShowGameDescViewOnce
=
false
;
showGameDescView
()
{
this
.
isShowGameDescViewOnce
=
true
;
viewMgr
.
openView
(
VIEW_DEF
.
RingSumDescView
);
}
onCloseGameDescView
()
{
this
.
gameState
=
GAME_STATE
.
RUN
;
}
setGameData
(
resData
:
object
)
{
//@ts-ignore
if
(
resData
.
totalTime
)
{
//@ts-ignore
this
.
totalTime
=
resData
.
totalTime
;
}
//@ts-ignore
if
(
resData
.
level
)
{
//@ts-ignore
this
.
level
=
resData
.
level
;
}
//@ts-ignore
if
(
resData
.
isShowGuide
)
{
//@ts-ignore
this
.
isShowGameDescViewOnce
=
false
;
}
else
{
this
.
isShowGameDescViewOnce
=
true
;
}
}
start
()
{
// [3]
// [3]
director
.
on
(
"rsitem_click"
,
this
.
onItemClick
,
this
);
director
.
on
(
"begin_countdown_end"
,
()
=>
{
//引导
if
(
!
this
.
isShowGameDescViewOnce
)
{
this
.
gameState
=
GAME_STATE
.
PAUSE
;
this
.
showGameDescView
();
}
else
{
this
.
gameState
=
GAME_STATE
.
RUN
;
}
},
this
);
director
.
on
(
"game_desc_close"
,
this
.
onCloseGameDescView
,
this
);
this
.
gameStart
();
this
.
gameStart
();
}
}
gameStart
(){
onDestroy
()
{
director
.
off
(
"rsitem_click"
,
this
.
onItemClick
,
this
);
director
.
off
(
"begin_countdown_end"
);
director
.
off
(
"game_desc_close"
,
this
.
onCloseGameDescView
,
this
);
}
gameStart
()
{
this
.
countdownLab
.
string
=
Utils
.
formatTime
(
Math
.
floor
(
this
.
totalTime
*
1000
));
this
.
curRSItem
=
null
!
;
this
.
loadLevelData
();
this
.
loadLevelData
();
this
.
circle
.
setAllText
(
this
.
levelData
.
numStrArr
);
this
.
circle
.
setAllText
(
this
.
levelData
.
numStrArr
);
this
.
circle
.
setAllItemType
(
this
.
levelData
.
fixCtrArr
);
this
.
circle
.
setAllItemType
(
this
.
levelData
.
fixCtrArr
);
this
.
circle
.
hideAllNorItemText
();
this
.
circle
.
hideAllNorItemText
();
viewMgr
.
openView
(
VIEW_DEF
.
BeginCountdownView
,
(
node
)
=>
{
node
.
getComponent
(
BeginCountdownView
)?.
init
();
},
VIEW_INDEX
.
UPPER
);
}
}
calculator
(
numStrArr
:
string
[]):
number
{
calculator
(
numStrArr
:
string
[]):
number
{
...
@@ -95,27 +172,113 @@ export class RingSumCtr extends Component {
...
@@ -95,27 +172,113 @@ export class RingSumCtr extends Component {
}
}
checkWin
()
{
checkWin
()
{
let
isWin
=
true
;
let
texts
=
this
.
circle
.
getAllText
();
let
texts
=
this
.
circle
.
getAllText
();
return
false
;
for
(
let
i
=
0
;
i
<
3
;
++
i
)
{
try
{
if
(
this
.
calculator
([
texts
[
i
][
0
],
"+"
,
texts
[
i
][
1
],
"+"
,
texts
[
i
][
2
]])
!=
this
.
levelData
.
result
)
{
isWin
=
false
;
}
}
catch
{
isWin
=
false
;
}
}
for
(
let
j
=
0
;
j
<
3
;
++
j
)
{
try
{
if
(
this
.
calculator
([
texts
[
0
][
j
],
"+"
,
texts
[
1
][
j
],
"+"
,
texts
[
2
][
j
]])
!=
this
.
levelData
.
result
)
{
isWin
=
false
;
}
}
catch
{
isWin
=
false
;
}
}
return
isWin
;
}
}
onItemClick
(
item
:
RingSumItem
){
onItemClick
(
item
:
RingSumItem
)
{
if
(
item
.
getItemType
()
==
RS_ITEM_TYPE
.
FIX
)
return
;
if
(
this
.
curRSItem
)
{
this
.
curRSItem
.
selSpr
.
node
.
active
=
false
;
this
.
curRSItem
.
setText
(
this
.
orgItemData
==
"+"
?
""
:
this
.
orgItemData
);
}
this
.
curRSItem
=
item
;
this
.
orgItemData
=
this
.
curRSItem
.
getText
();
this
.
curRSItem
.
selSpr
.
node
.
active
=
true
;
}
}
onNumIuputClick
(
err
:
any
,
flag
:
string
){
onNumIuputClick
(
err
:
any
,
flag
:
string
)
{
if
(
!
this
.
curRSItem
)
return
;
let
str
=
this
.
curRSItem
.
getText
()
==
"+"
?
""
:
this
.
curRSItem
.
getText
();
if
(
str
.
length
>=
5
)
return
;
if
(
str
==
"0"
)
{
str
=
flag
;
}
else
{
str
+=
flag
;
}
this
.
curRSItem
.
setText
(
str
);
}
}
onSubmitBtnClick
(){
onSubmitBtnClick
()
{
if
(
!
this
.
curRSItem
)
return
;
this
.
curRSItem
.
selSpr
.
node
.
active
=
false
;
this
.
curRSItem
=
null
!
;
this
.
orgItemData
=
""
;
//看看是不是有相同数字
if
(
!
this
.
circle
.
checkRepeat
()){
if
(
this
.
checkWin
()){
console
.
log
(
`赢了`
);
this
.
gameEnd
(
true
);
}
else
{
console
.
log
(
`还没赢`
);
}
}
}
onClearBtnClick
()
{
if
(
!
this
.
curRSItem
)
return
;
this
.
curRSItem
.
setText
(
""
);
}
}
onClearBtnClick
(){
gameEnd
(
isWin
:
boolean
)
{
this
.
gameState
=
GAME_STATE
.
END
;
if
(
isWin
)
{
viewMgr
.
openView
(
VIEW_DEF
.
ChallengeSuccView
,
(
node
)
=>
{
AudioMgr
.
playOneShot
(
succMus
);
node
?.
getComponent
(
ChallengeSuccView
)?.
init
();
},
VIEW_INDEX
.
TOP
);
}
else
{
viewMgr
.
openView
(
VIEW_DEF
.
ChallengeFailView
,
(
node
)
=>
{
AudioMgr
.
playOneShot
(
failMus
);
node
?.
getComponent
(
ChallengeFailView
);
},
VIEW_INDEX
.
TOP
);
}
}
//倒计时
countdownTime
(
dt
:
number
)
{
if
(
this
.
gameState
==
GAME_STATE
.
READY
||
this
.
gameState
==
GAME_STATE
.
END
||
this
.
gameState
==
GAME_STATE
.
PAUSE
)
{
return
;
}
this
.
costTime
+=
dt
;
if
(
!
this
.
isPlayCountdownMus
&&
this
.
totalTime
-
this
.
costTime
<
3.5
)
{
this
.
isPlayCountdownMus
=
true
;
AudioMgr
.
playOneShot
(
countdownMus
);
}
if
(
this
.
totalTime
-
this
.
costTime
<=
0
)
{
// console.log(`游戏时间到`);
this
.
gameEnd
(
false
);
return
;
}
this
.
countdownLab
.
string
=
Utils
.
formatTime
(
Math
.
floor
((
this
.
totalTime
-
this
.
costTime
)
*
1000
));
}
}
// update (deltaTime: number) {
update
(
deltaTime
:
number
)
{
// // [4]
// [4]
// }
this
.
countdownTime
(
deltaTime
);
}
}
}
assets/sceneBundle/games/ringSum/script/RingSumDescView.ts
0 → 100644
View file @
e5f8d0d4
import
{
_decorator
,
Component
,
Node
,
director
}
from
'cc'
;
import
{
VIEW_DEF
}
from
'../../../../startFolder/script/common/ViewDef'
;
import
{
viewMgr
}
from
'../../../../startFolder/script/common/ViewMgr'
;
import
{
GameDescView
}
from
'../../commonView/script/GameDescView'
;
const
{
ccclass
,
property
}
=
_decorator
;
@
ccclass
(
'RingSumDescView'
)
export
class
RingSumDescView
extends
GameDescView
{
start
()
{
// [3]
}
onClose
()
{
director
.
emit
(
"game_desc_close"
);
viewMgr
.
closeView
(
VIEW_DEF
.
RingSumDescView
);
}
// update (deltaTime: number) {
// // [4]
// }
}
assets/sceneBundle/games/ringSum/script/RingSumDescView.ts.meta
0 → 100644
View file @
e5f8d0d4
{
"ver": "4.0.22",
"importer": "typescript",
"imported": true,
"uuid": "d5b39efa-e883-4366-aeac-949290e4303f",
"files": [],
"subMetas": {},
"userData": {}
}
assets/sceneBundle/games/ringSum/script/RingSumItem.ts
View file @
e5f8d0d4
import
{
_decorator
,
Component
,
Node
,
Sprite
,
LabelComponent
,
Label
,
Color
}
from
'cc'
;
import
{
_decorator
,
Component
,
Node
,
Sprite
,
LabelComponent
,
Label
,
Color
,
director
,
Vec2
,
Collider
,
PolygonCollider2D
}
from
'cc'
;
import
{
Utils
}
from
'../../../../startFolder/script/common/Utils'
;
const
{
ccclass
,
property
}
=
_decorator
;
const
{
ccclass
,
property
}
=
_decorator
;
export
enum
RS_ITEM_TYPE
{
export
enum
RS_ITEM_TYPE
{
...
@@ -10,15 +11,15 @@ export enum RS_ITEM_TYPE {
...
@@ -10,15 +11,15 @@ export enum RS_ITEM_TYPE {
@
ccclass
(
'RingSumItem'
)
@
ccclass
(
'RingSumItem'
)
export
class
RingSumItem
extends
Component
{
export
class
RingSumItem
extends
Component
{
@
property
(
PolygonCollider2D
)
plyCod2d
:
PolygonCollider2D
=
null
!
;
@
property
(
Sprite
)
@
property
(
Sprite
)
selSpr
:
Sprite
=
null
!
;
selSpr
:
Sprite
=
null
!
;
@
property
(
Label
)
@
property
(
Label
)
numLab
:
Label
=
null
!
;
numLab
:
Label
=
null
!
;
@
property
(
Node
)
clickNode
:
Node
=
null
!
;
private
_itemType
=
RS_ITEM_TYPE
.
NOR
;
private
_itemType
=
RS_ITEM_TYPE
.
NOR
;
start
()
{
start
()
{
...
@@ -47,6 +48,7 @@ export class RingSumItem extends Component {
...
@@ -47,6 +48,7 @@ export class RingSumItem extends Component {
return
this
.
_itemType
;
return
this
.
_itemType
;
}
}
//重复
setRepLabColor
(){
setRepLabColor
(){
this
.
numLab
.
color
=
new
Color
(
255
,
0
,
0
,
255
);
this
.
numLab
.
color
=
new
Color
(
255
,
0
,
0
,
255
);
}
}
...
@@ -54,6 +56,10 @@ export class RingSumItem extends Component {
...
@@ -54,6 +56,10 @@ export class RingSumItem extends Component {
setNoRepLabColor
(){
setNoRepLabColor
(){
this
.
setItemType
(
this
.
getItemType
());
this
.
setItemType
(
this
.
getItemType
());
}
}
isTouch
(
point
:
Vec2
){
return
Utils
.
pointInPolygon
(
point
,
this
.
plyCod2d
.
points
);
}
// update (deltaTime: number) {
// update (deltaTime: number) {
// // [4]
// // [4]
// }
// }
...
...
assets/startFolder/script/LevelCfg.ts
View file @
e5f8d0d4
...
@@ -1013,7 +1013,7 @@ export const levelCfg: OneVarLevelItf[] = [
...
@@ -1013,7 +1013,7 @@ export const levelCfg: OneVarLevelItf[] = [
level
:
2
level
:
2
}
}
}
}
,
{
,
{
gameId
:
14003
,
gameId
:
14003
,
sceneUnitIfo
:
SCENE_DEF
.
NumMatReason_1
,
sceneUnitIfo
:
SCENE_DEF
.
NumMatReason_1
,
comName
:
"NumMatReasonCtr"
,
comName
:
"NumMatReasonCtr"
,
...
@@ -1165,4 +1165,22 @@ export const levelCfg: OneVarLevelItf[] = [
...
@@ -1165,4 +1165,22 @@ export const levelCfg: OneVarLevelItf[] = [
}
}
]
]
}
}
,
{
gameIdHead
:
200
,
title
:
"环形幻方"
,
desc
:
"环形幻方,第一个版本"
,
levelArr
:
[{
gameId
:
20001
,
sceneUnitIfo
:
SCENE_DEF
.
RingSum_1
,
comName
:
"RingSumCtr"
,
level
:
1
,
resData
:
{
totalTime
:
90
,
level
:
1
,
isShowGuide
:
true
}
}
]
}
];
];
\ No newline at end of file
assets/startFolder/script/LevelHomeCtr.ts
View file @
e5f8d0d4
...
@@ -26,7 +26,7 @@ export class LevelHomeCtr extends Component {
...
@@ -26,7 +26,7 @@ export class LevelHomeCtr extends Component {
// [3]
// [3]
if
(
!
levelMgr
.
loadedOutData
)
{
if
(
!
levelMgr
.
loadedOutData
)
{
levelMgr
.
loadedOutData
=
true
;
levelMgr
.
loadedOutData
=
true
;
levelMgr
.
gameIdHead
=
19
0
;
levelMgr
.
gameIdHead
=
20
0
;
levelMgr
.
unLockCount
=
10
;
levelMgr
.
unLockCount
=
10
;
if
(
Utils
.
getValueFromHref
(
"gameIdHead"
))
{
if
(
Utils
.
getValueFromHref
(
"gameIdHead"
))
{
levelMgr
.
gameIdHead
=
Number
(
Utils
.
getValueFromHref
(
"gameIdHead"
));
levelMgr
.
gameIdHead
=
Number
(
Utils
.
getValueFromHref
(
"gameIdHead"
));
...
...
assets/startFolder/script/common/SceneDef.ts
View file @
e5f8d0d4
...
@@ -107,6 +107,8 @@ interface ScenePathItf {
...
@@ -107,6 +107,8 @@ interface ScenePathItf {
VHFillNum_1
:
ScenePathUnitItf
,
VHFillNum_1
:
ScenePathUnitItf
,
//数式接龙
//数式接龙
FormulaSolitaire_1
:
ScenePathUnitItf
,
FormulaSolitaire_1
:
ScenePathUnitItf
,
//环形幻方
RingSum_1
:
ScenePathUnitItf
,
}
}
export
const
SCENE_DEF
:
ScenePathItf
=
{
export
const
SCENE_DEF
:
ScenePathItf
=
{
TestScene
:
{
TestScene
:
{
...
@@ -459,4 +461,9 @@ export const SCENE_DEF: ScenePathItf = {
...
@@ -459,4 +461,9 @@ export const SCENE_DEF: ScenePathItf = {
sceneName
:
"FormulaSolitaire_1"
,
sceneName
:
"FormulaSolitaire_1"
,
desc
:
"数式接龙,第一个版本"
desc
:
"数式接龙,第一个版本"
},
},
RingSum_1
:
{
bundleName
:
"sceneBundle"
,
sceneName
:
"RingSum_1"
,
desc
:
"环形幻方,第一个版本"
},
}
}
assets/startFolder/script/common/Utils.ts
View file @
e5f8d0d4
import
{
_decorator
,
Component
,
Node
}
from
'cc'
;
import
{
_decorator
,
Component
,
Node
,
Vec2
}
from
'cc'
;
const
{
ccclass
,
property
}
=
_decorator
;
const
{
ccclass
,
property
}
=
_decorator
;
export
class
Utils
{
export
class
Utils
{
...
@@ -35,15 +35,33 @@ export class Utils {
...
@@ -35,15 +35,33 @@ export class Utils {
let
s_mtr
=
s_num
>=
10
?
s_num
+
""
:
"0"
+
s_num
;
let
s_mtr
=
s_num
>=
10
?
s_num
+
""
:
"0"
+
s_num
;
return
m_str
+
":"
+
s_mtr
;
return
m_str
+
":"
+
s_mtr
;
}
}
/**
* !#en Test whether the point is in the polygon
* !#zh 测试一个点是否在一个多边形中
* @method pointInPolygon
* @param {Vec2} point - The point
* @param {Vec2[]} polygon - The polygon, a set of points
* @return {boolean}
*/
public
static
pointInPolygon
(
point
:
Vec2
,
polygon
:
Vec2
[])
{
var
inside
=
false
;
var
x
=
point
.
x
;
var
y
=
point
.
y
;
// use some raycasting to test hits
// https://github.com/substack/point-in-polygon/blob/master/index.js
var
length
=
polygon
.
length
;
for
(
var
i
=
0
,
j
=
length
-
1
;
i
<
length
;
j
=
i
++
)
{
var
xi
=
polygon
[
i
].
x
,
yi
=
polygon
[
i
].
y
,
xj
=
polygon
[
j
].
x
,
yj
=
polygon
[
j
].
y
,
intersect
=
((
yi
>
y
)
!==
(
yj
>
y
))
&&
(
x
<
(
xj
-
xi
)
*
(
y
-
yi
)
/
(
yj
-
yi
)
+
xi
);
if
(
intersect
)
inside
=
!
inside
;
}
return
inside
;
}
}
}
/**
* [1] Class member could be defined like this.
* [2] Use `property` decorator if your want the member to be serializable.
* [3] Your initialization goes here.
* [4] Your update function goes here.
*
* Learn more about scripting: https://docs.cocos.com/creator/3.0/manual/en/scripting/
* Learn more about CCClass: https://docs.cocos.com/creator/3.0/manual/en/scripting/ccclass.html
* Learn more about life-cycle callbacks: https://docs.cocos.com/creator/3.0/manual/en/scripting/life-cycle-callbacks.html
*/
assets/startFolder/script/common/ViewDef.ts
View file @
e5f8d0d4
...
@@ -70,6 +70,8 @@ interface ViewPathItf {
...
@@ -70,6 +70,8 @@ interface ViewPathItf {
LatticeBlockadeDescView
:
ViewPathUnitItf
,
LatticeBlockadeDescView
:
ViewPathUnitItf
,
//数字谜图游戏说明弹窗
//数字谜图游戏说明弹窗
DmfDescView
:
ViewPathUnitItf
,
DmfDescView
:
ViewPathUnitItf
,
//环形幻方游戏说明弹窗
RingSumDescView
:
ViewPathUnitItf
,
//测试弹窗
//测试弹窗
TestView_1
:
ViewPathUnitItf
TestView_1
:
ViewPathUnitItf
}
}
...
@@ -205,4 +207,9 @@ export const VIEW_DEF: ViewPathItf = {
...
@@ -205,4 +207,9 @@ export const VIEW_DEF: ViewPathItf = {
bundleName
:
"sceneBundle"
,
bundleName
:
"sceneBundle"
,
path
:
"games/digitalMysteryFigure/prefab/DmfDescView"
,
path
:
"games/digitalMysteryFigure/prefab/DmfDescView"
,
},
},
//环形幻方游戏说明弹窗
RingSumDescView
:
{
bundleName
:
"sceneBundle"
,
path
:
"games/ringSum/prefab/RingSumDescView"
,
},
}
}
\ No newline at end of file
settings/v2/packages/engine.json
View file @
e5f8d0d4
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
"_value"
:
false
"_value"
:
false
},
},
"physics-2d"
:
{
"physics-2d"
:
{
"_value"
:
fals
e
,
"_value"
:
tru
e
,
"_option"
:
"physics-2d-box2d"
"_option"
:
"physics-2d-box2d"
},
},
"physics-2d-box2d"
:
{
"physics-2d-box2d"
:
{
...
@@ -53,7 +53,7 @@
...
@@ -53,7 +53,7 @@
"_value"
:
false
"_value"
:
false
},
},
"intersection-2d"
:
{
"intersection-2d"
:
{
"_value"
:
fals
e
"_value"
:
tru
e
},
},
"primitive"
:
{
"primitive"
:
{
"_value"
:
false
"_value"
:
false
...
@@ -94,6 +94,8 @@
...
@@ -94,6 +94,8 @@
"gfx-webgl"
,
"gfx-webgl"
,
"2d"
,
"2d"
,
"ui"
,
"ui"
,
"physics-2d-box2d"
,
"intersection-2d"
,
"profiler"
,
"profiler"
,
"audio"
,
"audio"
,
"tween"
"tween"
...
...
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