Commit 6ce3a256 authored by Friends233's avatar Friends233

测试面板

parent 0486f6a6
......@@ -106,18 +106,21 @@
},
{
"__id__": 84
},
{
"__id__": 87
}
],
"_active": true,
"_components": [
{
"__id__": 87
"__id__": 103
},
{
"__id__": 88
"__id__": 104
},
{
"__id__": 89
"__id__": 105
}
],
"_prefab": null,
......@@ -578,7 +581,7 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "46+FYCWLBDH67yjSbsmTPC"
"_id": "07ZQOj+O5DupSUzq6wJ1x1"
},
{
"__type__": "cc.Sprite",
......@@ -608,7 +611,7 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "1fxEwbW15H2rKu0GO4i76s"
"_id": "0djeEpGbJNXrPz0cbF9Itp"
},
{
"__type__": "7c5ffhlHDpBpoDQ8wfKN7pu",
......@@ -2346,7 +2349,7 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "3eJR6hVPpPcLNz859SOTME"
"_id": "14FuV4E4pKcJXoee/woO9W"
},
{
"__type__": "cc.Sprite",
......@@ -2376,7 +2379,7 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "95F1WiOu5PsJoh2JWm5bcX"
"_id": "1dmEUoDDFGSr1H3zBl57qz"
},
{
"__type__": "cc.Node",
......@@ -2438,7 +2441,7 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "7eHihDk+dKWqS5uDiN5JUJ"
"_id": "4cuxTEbehCsJYSCSHpIpH/"
},
{
"__type__": "cc.Sprite",
......@@ -2468,7 +2471,7 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "d2REWnsf9LHbic+HJfl1OK"
"_id": "cdmDsSacRKg6pcDEshTXfh"
},
{
"__type__": "cc.Node",
......@@ -2530,7 +2533,7 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "95k3k+oFVMYa4WHiH+mhSw"
"_id": "3aOKea3k9BY4pPb9dmlQDV"
},
{
"__type__": "cc.Sprite",
......@@ -2560,7 +2563,7 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "71whya1IRAOaTFK4TiGzQT"
"_id": "23LPXn1BRFiItlEoT0OOmm"
},
{
"__type__": "cc.Node",
......@@ -2622,7 +2625,7 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "d4L4O2OuRGXJP/lyvg3zhB"
"_id": "5biWgPGa9LWIggHPTmoumk"
},
{
"__type__": "cc.Sprite",
......@@ -2652,7 +2655,7 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "9eeeNqEe1KJYu5TGSKOeMz"
"_id": "6aX2V3JMlN26khZTAyTodl"
},
{
"__type__": "7c5ffhlHDpBpoDQ8wfKN7pu",
......@@ -3795,6 +3798,849 @@
"_N$target": null,
"_id": "64Rj7LcPhFha3agDpN/rfa"
},
{
"__type__": "cc.Node",
"_name": "test",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [
{
"__id__": 88
},
{
"__id__": 95
}
],
"_active": true,
"_components": [
{
"__id__": 102
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 250,
"height": 40
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
695.681,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "58kp9FiJRKQpDO+8b02LrQ"
},
{
"__type__": "cc.Node",
"_name": "next",
"_objFlags": 0,
"_parent": {
"__id__": 87
},
"_children": [
{
"__id__": 89
}
],
"_active": true,
"_components": [
{
"__id__": 94
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 40
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-75,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "a6PRMKnwBOP4wTRe0wybFf"
},
{
"__type__": "cc.Node",
"_name": "Background",
"_objFlags": 512,
"_parent": {
"__id__": 88
},
"_children": [
{
"__id__": 90
}
],
"_active": true,
"_components": [
{
"__id__": 92
},
{
"__id__": 93
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 40
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "d4hc3UtSBLY41auHQ4vROs"
},
{
"__type__": "cc.Node",
"_name": "Label",
"_objFlags": 512,
"_parent": {
"__id__": 89
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 91
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 40
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "47dhRUJ/dIAJr4KnZQXGR8"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 90
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "下一关",
"_N$string": "下一关",
"_fontSize": 20,
"_lineHeight": 40,
"_enableWrapText": false,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 1,
"_N$cacheMode": 1,
"_id": "56LiPv/IpMepjJiFwIUi1O"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 89
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
},
"_type": 1,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "11k0VYtP9Cv4jvxQI+Q4AT"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 89
},
"_enabled": true,
"alignMode": 0,
"_target": null,
"_alignFlags": 45,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 100,
"_originalHeight": 40,
"_id": "3ewd3KD31KIoe7u/XRlkBm"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 88
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 2,
"transition": 2,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 230,
"g": 230,
"b": 230,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 200,
"g": 200,
"b": 200,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 200,
"g": 200,
"b": 200,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 120,
"g": 120,
"b": 120,
"a": 200
},
"_N$normalSprite": {
"__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
},
"_N$pressedSprite": {
"__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
},
"pressedSprite": {
"__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
},
"_N$hoverSprite": {
"__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
},
"hoverSprite": {
"__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
},
"_N$disabledSprite": {
"__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
},
"_N$target": {
"__id__": 89
},
"_id": "dfguRopclGIqZktevHrnhT"
},
{
"__type__": "cc.Node",
"_name": "refreshProp",
"_objFlags": 0,
"_parent": {
"__id__": 87
},
"_children": [
{
"__id__": 96
}
],
"_active": true,
"_components": [
{
"__id__": 101
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 40
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
75,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "c8wSmRVkxOkLfZhjJb0PQW"
},
{
"__type__": "cc.Node",
"_name": "Background",
"_objFlags": 512,
"_parent": {
"__id__": 95
},
"_children": [
{
"__id__": 97
}
],
"_active": true,
"_components": [
{
"__id__": 99
},
{
"__id__": 100
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 40
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "9e6Yn4o4NGnJnVNGEZxScT"
},
{
"__type__": "cc.Node",
"_name": "Label",
"_objFlags": 512,
"_parent": {
"__id__": 96
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 98
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 40
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "98LFZ6PtRKvaIESXv7DZ7b"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 97
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "刷新道具",
"_N$string": "刷新道具",
"_fontSize": 20,
"_lineHeight": 40,
"_enableWrapText": false,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 1,
"_N$cacheMode": 1,
"_id": "61oQnINhtItpi/XXvjw9YE"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 96
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
},
"_type": 1,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "79qwMw+hNEw4yi2+MCCznA"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 96
},
"_enabled": true,
"alignMode": 0,
"_target": null,
"_alignFlags": 45,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 100,
"_originalHeight": 40,
"_id": "d80kuzEWhLeKRjLxkZCldN"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 95
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 2,
"transition": 2,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 230,
"g": 230,
"b": 230,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 200,
"g": 200,
"b": 200,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 200,
"g": 200,
"b": 200,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 120,
"g": 120,
"b": 120,
"a": 200
},
"_N$normalSprite": {
"__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
},
"_N$pressedSprite": {
"__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
},
"pressedSprite": {
"__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
},
"_N$hoverSprite": {
"__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
},
"hoverSprite": {
"__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
},
"_N$disabledSprite": {
"__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
},
"_N$target": {
"__id__": 96
},
"_id": "06Xai9BG1CKLT3kEY+FESD"
},
{
"__type__": "cc.Layout",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 87
},
"_enabled": true,
"_layoutSize": {
"__type__": "cc.Size",
"width": 250,
"height": 40
},
"_resize": 1,
"_N$layoutType": 3,
"_N$cellSize": {
"__type__": "cc.Size",
"width": 40,
"height": 40
},
"_N$startAxis": 0,
"_N$paddingLeft": 0,
"_N$paddingRight": 0,
"_N$paddingTop": 0,
"_N$paddingBottom": 0,
"_N$spacingX": 50,
"_N$spacingY": 20,
"_N$verticalDirection": 1,
"_N$horizontalDirection": 0,
"_N$affectedByScale": false,
"_id": "aan0T6T2RPn7Wy7sHXeouG"
},
{
"__type__": "cc.Canvas",
"_name": "",
......
......@@ -24,15 +24,15 @@ const CLIP_STATE = {
@ccclass
export default class GameScene extends cc.Component {
/** 单格进度条 */
@property(cc.Prefab)
@property({ type: cc.Prefab, displayName: '单格进度条' })
procItem: cc.Prefab = null
/** 舞台道具 */
@property([cc.Prefab])
@property({ type: [cc.Prefab], displayName: '舞台道具' })
propItem: cc.Prefab[] = []
/** 加分道具 */
@property(cc.Prefab)
@property({ type: cc.Prefab, displayName: '加分道具' })
bsetPropItem: cc.Prefab = null
/** 当前关卡 0、1、2... */
......@@ -75,7 +75,7 @@ export default class GameScene extends cc.Component {
/** 开启碰撞检测 */
const cm = cc.director.getCollisionManager()
cm.enabled = true
cm.enabledDebugDraw = true;
// cm.enabledDebugDraw = true;
}
start() {
......@@ -113,6 +113,22 @@ export default class GameScene extends cc.Component {
gameBtn.on(cc.Node.EventType.TOUCH_END, this.playGame, this)
this.node.on(CUSTOM_EVENT.CLIP_ANI_END, this.onAnimCompleted, this)
this.node.on(CUSTOM_EVENT.CLIP_COLLISION, this.onCollEnter, this)
// TODO 测试用
const href = window?.location?.href
const isTest = href?.includes('duibadev') || href?.includes('duibatest') || href?.includes('localhost')
const testNode = cc.find('test', this.node)
testNode.active = isTest
if (isTest) {
const testEventMap = {
next: 'nextLevel',
refreshProp: 'refreshStageProps',
addTime: 'addTime'
}
testNode.children.forEach((n) => {
const event = this?.[testEventMap[n.name]]
n.on(cc.Node.EventType.TOUCH_END, event, this)
})
}
}
/**
......
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