Commit 343efb3b by william

feat: order game node

parent a456cd7e
......@@ -62,26 +62,35 @@
"__id__": 5
},
{
"__id__": 7
"__id__": 15
},
{
"__id__": 9
"__id__": 17
},
{
"__id__": 14
"__id__": 18
},
{
"__id__": 16
"__id__": 19
},
{
"__id__": 23
},
{
"__id__": 25
},
{
"__id__": 26
}
],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 18
"__id__": 27
},
{
"__id__": 19
"__id__": 28
}
],
"_prefab": null,
......@@ -201,21 +210,27 @@
},
{
"__type__": "cc.Node",
"_name": "logo",
"_name": "index",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_tag": -1,
"_active": true,
"_components": [
"_children": [
{
"__id__": 6
},
{
"__id__": 11
},
{
"__id__": 13
}
],
"_tag": -1,
"_active": true,
"_components": [],
"_prefab": null,
"_id": "d6B3OYIbdA0oKVBARBzlsD",
"_id": "11Whf+9qZFC6iWPyh0zx07",
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
......@@ -232,86 +247,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 332,
"height": 110
},
"_rotationX": 0,
"_rotationY": 0,
"_scaleX": 0.6,
"_scaleY": 0.6,
"_position": {
"__type__": "cc.Vec2",
"x": 2,
"y": 182
},
"_skewX": 0,
"_skewY": 0,
"_localZOrder": 0,
"_globalZOrder": 0,
"_opacityModifyRGB": false,
"groupIndex": 0
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
},
"_enabled": true,
"_spriteFrame": {
"__uuid__": "26869b11-f810-4bbe-994e-793228a11892"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_atlas": null
},
{
"__type__": "cc.Node",
"_name": "subtitle",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 8
}
],
"_prefab": null,
"_id": "71kSDoZslK+qnciDr+46zc",
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_cascadeOpacityEnabled": true,
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_contentSize": {
"__type__": "cc.Size",
"width": 160,
"height": 120
"width": 0,
"height": 0
},
"_rotationX": 0,
"_rotationY": 0,
......@@ -319,8 +256,8 @@
"_scaleY": 1,
"_position": {
"__type__": "cc.Vec2",
"x": 2,
"y": 75
"x": 0,
"y": 0
},
"_skewX": 0,
"_skewY": 0,
......@@ -330,47 +267,25 @@
"groupIndex": 0
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
},
"_enabled": true,
"_useOriginalSize": false,
"_actualFontSize": 20,
"_fontSize": 20,
"_lineHeight": 40,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_N$string": "点击屏幕开始撩妹\n在下课前快速撩妹\n避免被老师发现",
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0
},
{
"__type__": "cc.Node",
"_name": "start_btn",
"_objFlags": 0,
"_parent": {
"__id__": 2
"__id__": 5
},
"_children": [
{
"__id__": 10
"__id__": 7
}
],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 12
"__id__": 9
},
{
"__id__": 13
"__id__": 10
}
],
"_prefab": null,
......@@ -415,14 +330,14 @@
"_name": "Start",
"_objFlags": 0,
"_parent": {
"__id__": 9
"__id__": 6
},
"_children": [],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 11
"__id__": 8
}
],
"_prefab": null,
......@@ -467,7 +382,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 10
"__id__": 7
},
"_enabled": true,
"isOpenGame": false
......@@ -477,7 +392,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
"__id__": 6
},
"_enabled": true,
"_spriteFrame": {
......@@ -503,34 +418,34 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
"__id__": 6
},
"_enabled": true,
"isOpenGame": false
},
{
"__type__": "cc.Node",
"_name": "classroom",
"_name": "subtitle",
"_objFlags": 0,
"_parent": {
"__id__": 2
"__id__": 5
},
"_children": [],
"_tag": -1,
"_active": false,
"_active": true,
"_components": [
{
"__id__": 15
"__id__": 12
}
],
"_prefab": null,
"_id": "09EzHWUxdBmJlkWjuuPfMN",
"_id": "71kSDoZslK+qnciDr+46zc",
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_cascadeOpacityEnabled": true,
......@@ -541,8 +456,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 375,
"height": 600
"width": 160,
"height": 120
},
"_rotationX": 0,
"_rotationY": 0,
......@@ -550,8 +465,8 @@
"_scaleY": 1,
"_position": {
"__type__": "cc.Vec2",
"x": 0,
"y": -75
"x": 2,
"y": 75
},
"_skewX": 0,
"_skewY": 0,
......@@ -561,48 +476,44 @@
"groupIndex": 0
},
{
"__type__": "cc.Sprite",
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 14
"__id__": 11
},
"_enabled": true,
"_spriteFrame": {
"__uuid__": "1b29ad23-8777-436b-a7aa-5c7869ce1389"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_atlas": null
"_useOriginalSize": false,
"_actualFontSize": 20,
"_fontSize": 20,
"_lineHeight": 40,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_N$string": "点击屏幕开始撩妹\n在下课前快速撩妹\n避免被老师发现",
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0
},
{
"__type__": "cc.Node",
"_name": "hand",
"_name": "logo",
"_objFlags": 0,
"_parent": {
"__id__": 2
"__id__": 5
},
"_children": [],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 17
"__id__": 14
}
],
"_prefab": null,
"_id": "c91SgtpVVI44d283YT+CO9",
"_id": "d6B3OYIbdA0oKVBARBzlsD",
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
......@@ -619,17 +530,17 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 302,
"height": 378
"width": 332,
"height": 110
},
"_rotationX": 0,
"_rotationY": 0,
"_scaleX": 0.4,
"_scaleY": 0.4,
"_scaleX": 0.6,
"_scaleY": 0.6,
"_position": {
"__type__": "cc.Vec2",
"x": 104,
"y": -340
"x": 2,
"y": 182
},
"_skewX": 0,
"_skewY": 0,
......@@ -643,14 +554,14 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 16
"__id__": 13
},
"_enabled": true,
"_spriteFrame": {
"__uuid__": "b5b26273-de9d-42a1-94c5-7b4839b6e1cf"
"__uuid__": "26869b11-f810-4bbe-994e-793228a11892"
},
"_type": 0,
"_sizeMode": 1,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
......@@ -665,49 +576,593 @@
"_atlas": null
},
{
"__type__": "cc.Canvas",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_designResolution": {
"__type__": "cc.Size",
"width": 375,
"height": 750
},
"_fitWidth": false,
"_fitHeight": true
},
{
"__type__": "e4c9b01WKRDtYbVX2Ed1Nfl",
"_name": "",
"__type__": "cc.Node",
"_name": "classroom",
"_objFlags": 0,
"node": {
"_parent": {
"__id__": 2
},
"_enabled": true,
"score": 0,
"time": 60,
"leftLife": 3,
"swivelAnimationTime": 0.2,
"flirtAnimationTime": 0.2,
"gameState": "waiting",
"logo": {
"__id__": 5
"_children": [],
"_tag": -1,
"_active": false,
"_components": [
{
"__id__": 16
}
],
"_prefab": null,
"_id": "09EzHWUxdBmJlkWjuuPfMN",
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_cascadeOpacityEnabled": true,
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_contentSize": {
"__type__": "cc.Size",
"width": 375,
"height": 600
},
"_rotationX": 0,
"_rotationY": 0,
"_scaleX": 1,
"_scaleY": 1,
"_position": {
"__type__": "cc.Vec2",
"x": 0,
"y": -75
},
"_skewX": 0,
"_skewY": 0,
"_localZOrder": 0,
"_globalZOrder": 0,
"_opacityModifyRGB": false,
"groupIndex": 0
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 15
},
"_enabled": true,
"_spriteFrame": {
"__uuid__": "1b29ad23-8777-436b-a7aa-5c7869ce1389"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_atlas": null
},
{
"__type__": "cc.Node",
"_name": "teacher",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_tag": -1,
"_active": true,
"_components": [],
"_prefab": null,
"_id": "67K6Y1EOVDuJEJ6kufn8TI",
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_cascadeOpacityEnabled": true,
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_rotationX": 0,
"_rotationY": 0,
"_scaleX": 1,
"_scaleY": 1,
"_position": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_skewX": 0,
"_skewY": 0,
"_localZOrder": 0,
"_globalZOrder": 0,
"_opacityModifyRGB": false,
"groupIndex": 0
},
{
"__type__": "cc.Node",
"_name": "student",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_tag": -1,
"_active": true,
"_components": [],
"_prefab": null,
"_id": "797uGBCXpALbTmcH0WGjHM",
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_cascadeOpacityEnabled": true,
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_rotationX": 0,
"_rotationY": 0,
"_scaleX": 1,
"_scaleY": 1,
"_position": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_skewX": 0,
"_skewY": 0,
"_localZOrder": 0,
"_globalZOrder": 0,
"_opacityModifyRGB": false,
"groupIndex": 0
},
{
"__type__": "cc.Node",
"_name": "board",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [
{
"__id__": 20
},
{
"__id__": 21
},
{
"__id__": 22
}
],
"_tag": -1,
"_active": true,
"_components": [],
"_prefab": null,
"_id": "b6UhBzM8tC8qOPuU1bO60n",
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_cascadeOpacityEnabled": true,
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_rotationX": 0,
"_rotationY": 0,
"_scaleX": 1,
"_scaleY": 1,
"_position": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_skewX": 0,
"_skewY": 0,
"_localZOrder": 0,
"_globalZOrder": 0,
"_opacityModifyRGB": false,
"groupIndex": 0
},
{
"__type__": "cc.Node",
"_name": "timer",
"_objFlags": 0,
"_parent": {
"__id__": 19
},
"_children": [],
"_tag": -1,
"_active": true,
"_components": [],
"_prefab": null,
"_id": "72oI+QL4FHkLRzPjbmVAKC",
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_cascadeOpacityEnabled": true,
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_rotationX": 0,
"_rotationY": 0,
"_scaleX": 1,
"_scaleY": 1,
"_position": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_skewX": 0,
"_skewY": 0,
"_localZOrder": 0,
"_globalZOrder": 0,
"_opacityModifyRGB": false,
"groupIndex": 0
},
{
"__type__": "cc.Node",
"_name": "score",
"_objFlags": 0,
"_parent": {
"__id__": 19
},
"_children": [],
"_tag": -1,
"_active": true,
"_components": [],
"_prefab": null,
"_id": "91m1cv1EdIX4yug893AJz7",
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_cascadeOpacityEnabled": true,
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_rotationX": 0,
"_rotationY": 0,
"_scaleX": 1,
"_scaleY": 1,
"_position": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_skewX": 0,
"_skewY": 0,
"_localZOrder": 0,
"_globalZOrder": 0,
"_opacityModifyRGB": false,
"groupIndex": 0
},
{
"__type__": "cc.Node",
"_name": "life",
"_objFlags": 0,
"_parent": {
"__id__": 19
},
"_children": [],
"_tag": -1,
"_active": true,
"_components": [],
"_prefab": null,
"_id": "bdSU9wyDZNh7HtK8tnUXyL",
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_cascadeOpacityEnabled": true,
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_rotationX": 0,
"_rotationY": 0,
"_scaleX": 1,
"_scaleY": 1,
"_position": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_skewX": 0,
"_skewY": 0,
"_localZOrder": 0,
"_globalZOrder": 0,
"_opacityModifyRGB": false,
"groupIndex": 0
},
{
"__type__": "cc.Node",
"_name": "hand",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 24
}
],
"_prefab": null,
"_id": "c91SgtpVVI44d283YT+CO9",
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_cascadeOpacityEnabled": true,
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_contentSize": {
"__type__": "cc.Size",
"width": 302,
"height": 378
},
"_rotationX": 0,
"_rotationY": 0,
"_scaleX": 0.4,
"_scaleY": 0.4,
"_position": {
"__type__": "cc.Vec2",
"x": 104,
"y": -340
},
"_skewX": 0,
"_skewY": 0,
"_localZOrder": 0,
"_globalZOrder": 0,
"_opacityModifyRGB": false,
"groupIndex": 0
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 23
},
"_enabled": true,
"_spriteFrame": {
"__uuid__": "b5b26273-de9d-42a1-94c5-7b4839b6e1cf"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_atlas": null
},
{
"__type__": "cc.Node",
"_name": "failure",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_tag": -1,
"_active": true,
"_components": [],
"_prefab": null,
"_id": "f5ix1S5ixDqJ82EmycPor2",
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_cascadeOpacityEnabled": true,
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_rotationX": 0,
"_rotationY": 0,
"_scaleX": 1,
"_scaleY": 1,
"_position": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_skewX": 0,
"_skewY": 0,
"_localZOrder": 0,
"_globalZOrder": 0,
"_opacityModifyRGB": false,
"groupIndex": 0
},
{
"__type__": "cc.Node",
"_name": "success",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_tag": -1,
"_active": true,
"_components": [],
"_prefab": null,
"_id": "f3QEdZlRtFaJOS+nqkQWrK",
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_cascadeOpacityEnabled": true,
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_rotationX": 0,
"_rotationY": 0,
"_scaleX": 1,
"_scaleY": 1,
"_position": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_skewX": 0,
"_skewY": 0,
"_localZOrder": 0,
"_globalZOrder": 0,
"_opacityModifyRGB": false,
"groupIndex": 0
},
{
"__type__": "cc.Canvas",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_designResolution": {
"__type__": "cc.Size",
"width": 375,
"height": 750
},
"_fitWidth": false,
"_fitHeight": true
},
{
"__type__": "e4c9b01WKRDtYbVX2Ed1Nfl",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"logo": {
"__id__": 13
},
"subtitle": {
"__id__": 7
"__id__": 11
},
"start_btn": {
"__id__": 9
"__id__": 6
},
"classroom": {
"__id__": 14
"__id__": 15
},
"hand": {
"__id__": 16
"__id__": 23
}
}
]
\ No newline at end of file
......@@ -29,6 +29,7 @@ cc.Class({
classroom: {
default: null,
type: cc.Node,
active: false,
},
// hand节点
......@@ -49,7 +50,7 @@ cc.Class({
this.flirtAnimationTime = 0.5; //摸的动画时间(单向)
// 奖Game组件的实例传入开始按钮
var startBtn = this.node.getChildByName("start_btn");
var startBtn = cc.find("index/start_btn", this.node);
startBtn.getComponent('Start').game = 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