Commit 848e7a8e authored by wangxin's avatar wangxin

test03

parent 1101215b
No preview for this file type
{
"__type__": "cc.AnimationClip",
"_name": "icon_sound",
"_name": "icon_sound_finish",
"_objFlags": 0,
"_native": "",
"_duration": 0,
"_duration": 0.016666666666666666,
"sample": 60,
"speed": 1,
"wrapMode": 1,
"curveData": {
"comps": {
"cc.Sprite": {
"spriteFrame": []
"spriteFrame": [
{
"frame": 0,
"value": {
"__uuid__": "781a51f6-3297-47ba-ad00-9a418e7f9e95"
}
}
]
}
}
},
......
{
"__type__": "cc.AnimationClip",
"_name": "wrong",
"_objFlags": 0,
"_native": "",
"_duration": 6,
"sample": 60,
"speed": 4,
"wrapMode": 1,
"curveData": {
"props": {
"position": [
{
"frame": 0,
"value": [
0,
0,
0
]
},
{
"frame": 0.5,
"value": [
-10,
0,
0
]
},
{
"frame": 1,
"value": [
0,
0,
0
]
},
{
"frame": 1.5,
"value": [
10,
0,
0
]
},
{
"frame": 2,
"value": [
0,
0,
0
]
},
{
"frame": 2.5,
"value": [
-10,
0,
0
]
},
{
"frame": 3,
"value": [
0,
0,
0
]
},
{
"frame": 3.5,
"value": [
10,
0,
0
]
},
{
"frame": 4,
"value": [
0,
0,
0
]
},
{
"frame": 4.5,
"value": [
-10,
0,
0
]
},
{
"frame": 5,
"value": [
0,
0,
0
]
},
{
"frame": 5.5,
"value": [
10,
0,
0
]
},
{
"frame": 6,
"value": [
0,
0,
0
]
}
]
}
},
"events": []
}
\ No newline at end of file
{
"ver": "2.1.0",
"uuid": "b2ca5c8c-5d35-44c7-948b-810789a2bccd",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "477a4289-7aea-4116-b80f-d3719a5a0191",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 64,
"height": 64,
"platformSettings": {},
"subMetas": {
"particle": {
"ver": "1.0.4",
"uuid": "a20aecd1-ff1b-458d-a4e2-13cf79681ff6",
"rawTextureUuid": "477a4289-7aea-4116-b80f-d3719a5a0191",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -1.5,
"offsetY": 1.5,
"trimX": 12,
"trimY": 10,
"width": 37,
"height": 41,
"rawWidth": 64,
"rawHeight": 64,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>angle</key>
<real>253.41999816894531</real>
<key>angleVariance</key>
<real>0.0</real>
<key>blendFuncDestination</key>
<integer>771</integer>
<key>blendFuncSource</key>
<integer>1</integer>
<key>duration</key>
<real>-1</real>
<key>emitterType</key>
<real>0.0</real>
<key>finishColorAlpha</key>
<real>1</real>
<key>finishColorBlue</key>
<real>1</real>
<key>finishColorGreen</key>
<real>1</real>
<key>finishColorRed</key>
<real>1</real>
<key>finishColorVarianceAlpha</key>
<real>0</real>
<key>finishColorVarianceBlue</key>
<real>1</real>
<key>finishColorVarianceGreen</key>
<real>1</real>
<key>finishColorVarianceRed</key>
<real>1</real>
<key>finishParticleSize</key>
<real>30</real>
<key>finishParticleSizeVariance</key>
<real>10</real>
<key>gravityx</key>
<real>0.0</real>
<key>gravityy</key>
<real>-100.54499816894531</real>
<key>maxParticles</key>
<real>400</real>
<key>maxRadius</key>
<real>100</real>
<key>maxRadiusVariance</key>
<real>0.0</real>
<key>minRadius</key>
<real>0.0</real>
<key>particleLifespan</key>
<real>5</real>
<key>particleLifespanVariance</key>
<real>0.0</real>
<key>radialAccelVariance</key>
<real>0.0</real>
<key>radialAcceleration</key>
<real>0.0</real>
<key>rotatePerSecond</key>
<real>0.0</real>
<key>rotatePerSecondVariance</key>
<real>0.0</real>
<key>rotationEnd</key>
<real>804.1529541015625</real>
<key>rotationEndVariance</key>
<real>-3600</real>
<key>rotationStart</key>
<real>450.37005615234375</real>
<key>rotationStartVariance</key>
<real>-1270.0657958984375</real>
<key>sourcePositionVariancex</key>
<real>1088</real>
<key>sourcePositionVariancey</key>
<real>0.0</real>
<key>sourcePositionx</key>
<real>384</real>
<key>sourcePositiony</key>
<real>785.88232421875</real>
<key>speed</key>
<real>100</real>
<key>speedVariance</key>
<real>300</real>
<key>startColorAlpha</key>
<real>1</real>
<key>startColorBlue</key>
<real>1</real>
<key>startColorGreen</key>
<real>1</real>
<key>startColorRed</key>
<real>1</real>
<key>startColorVarianceAlpha</key>
<real>0</real>
<key>startColorVarianceBlue</key>
<real>1</real>
<key>startColorVarianceGreen</key>
<real>1</real>
<key>startColorVarianceRed</key>
<real>1</real>
<key>startParticleSize</key>
<real>30</real>
<key>startParticleSizeVariance</key>
<real>10</real>
<key>tangentialAccelVariance</key>
<real>0.0</real>
<key>tangentialAcceleration</key>
<real>0.0</real>
<key>textureFileName</key>
<string>particle.png</string>
</dict>
</plist>
{
"ver": "2.0.1",
"uuid": "538af702-8a0f-4265-beb1-be7a0f687356",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "daae9bc9-d3a9-4d5a-8b08-d39bd5a958da",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 120,
"height": 120,
"platformSettings": {},
"subMetas": {
"sui": {
"ver": "1.0.4",
"uuid": "fb6b1982-4305-4b8a-a83e-04ac25732105",
"rawTextureUuid": "daae9bc9-d3a9-4d5a-8b08-d39bd5a958da",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0.5,
"offsetY": 0.5,
"trimX": 1,
"trimY": 3,
"width": 119,
"height": 113,
"rawWidth": 120,
"rawHeight": 120,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
......@@ -19,25 +19,25 @@
"_children": [
{
"__id__": 2
}
],
"_active": true,
"_components": [
},
{
"__id__": 5
},
{
"__id__": 6
},
"__id__": 8
}
],
"_active": true,
"_components": [
{
"__id__": 7
"__id__": 11
},
{
"__id__": 8
"__id__": 12
}
],
"_prefab": {
"__id__": 9
"__id__": 13
},
"_opacity": 255,
"_color": {
......@@ -88,13 +88,13 @@
},
{
"__type__": "cc.Node",
"_name": "sprite",
"_name": "pic_frame_selected",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 3
......@@ -104,6 +104,113 @@
"__id__": 4
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 232,
"g": 67,
"b": 29,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 253,
"height": 219
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
-1,
0,
0,
0,
0,
1,
1.06,
1.1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 1,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "dec1094e-44d7-400e-ae82-87256133f537"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "b74714cb-b4ed-49a6-9955-c21a7c47db01"
},
"fileId": "2dGGITfL1FmLu4WXaq1ijO",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "pic_frame",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 6
}
],
"_prefab": {
"__id__": 7
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
......@@ -113,8 +220,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 168,
"height": 168
"width": 253,
"height": 227
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -155,7 +262,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
"__id__": 5
},
"_enabled": true,
"_materials": [
......@@ -166,10 +273,10 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "8cdb44ac-a3f6-449f-b354-7cd48cf84061"
"__uuid__": "7fea9c73-91cb-4f14-b9e9-0ba62035d742"
},
"_type": 0,
"_sizeMode": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
......@@ -190,15 +297,79 @@
"asset": {
"__uuid__": "b74714cb-b4ed-49a6-9955-c21a7c47db01"
},
"fileId": "16DPpqsdpDG4Q1+EyiNkvS",
"fileId": "6dq18PWx1CippwCfwZboH5",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "sprite",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 9
}
],
"_prefab": {
"__id__": 10
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 168,
"height": 168
},
"_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": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
"__id__": 8
},
"_enabled": true,
"_materials": [
......@@ -208,11 +379,9 @@
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "7fea9c73-91cb-4f14-b9e9-0ba62035d742"
},
"_spriteFrame": null,
"_type": 0,
"_sizeMode": 1,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
......@@ -225,6 +394,17 @@
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "b74714cb-b4ed-49a6-9955-c21a7c47db01"
},
"fileId": "16DPpqsdpDG4Q1+EyiNkvS",
"sync": false
},
{
"__type__": "cc.BoxCollider",
"_name": "",
......@@ -241,8 +421,8 @@
},
"_size": {
"__type__": "cc.Size",
"width": 253,
"height": 227
"width": 102,
"height": 102
},
"_id": ""
},
......@@ -255,10 +435,10 @@
},
"_enabled": true,
"pic": {
"__id__": 3
"__id__": 9
},
"particle_star": {
"__uuid__": "de39730a-d6dc-4031-9744-9ca5c01fc1f0"
"pic_selected": {
"__id__": 2
},
"sounds": [
{
......@@ -273,23 +453,8 @@
"_isEnter": false,
"_isContact": false,
"_soundOp": null,
"_id": ""
},
{
"__type__": "cc.Animation",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"_defaultClip": null,
"_clips": [
{
"__uuid__": "b2ca5c8c-5d35-44c7-948b-810789a2bccd"
}
],
"playOnLoad": false,
"_picUrl": null,
"_spriteFrame": null,
"_id": ""
},
{
......
......@@ -19,22 +19,25 @@
"_children": [
{
"__id__": 2
},
{
"__id__": 8
}
],
"_active": true,
"_components": [
{
"__id__": 12
"__id__": 18
},
{
"__id__": 13
"__id__": 19
},
{
"__id__": 14
"__id__": 20
}
],
"_prefab": {
"__id__": 15
"__id__": 21
},
"_opacity": 255,
"_color": {
......@@ -85,7 +88,7 @@
},
{
"__type__": "cc.Node",
"_name": "btn_sound",
"_name": "pic_frame",
"_objFlags": 0,
"_parent": {
"__id__": 1
......@@ -95,20 +98,236 @@
"__id__": 3
}
],
"_active": false,
"_components": [
{
"__id__": 6
}
],
"_prefab": {
"__id__": 7
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 253,
"height": 227
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
-3.16,
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": ""
},
{
"__type__": "cc.Node",
"_name": "sprite",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 7
"__id__": 4
}
],
"_prefab": {
"__id__": 5
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 168,
"height": 168
},
"_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": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": null,
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "f816bebc-d7fa-41ca-aa93-efe1af15931d"
},
"fileId": "d4CYgukWBK5JO7udUmvZT4",
"sync": false
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "7fea9c73-91cb-4f14-b9e9-0ba62035d742"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "f816bebc-d7fa-41ca-aa93-efe1af15931d"
},
"fileId": "4dd0omDwFOopCQREjKUE40",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "btn_sound",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 9
}
],
"_active": true,
"_components": [
{
"__id__": 13
},
{
"__id__": 8
"__id__": 14
},
{
"__id__": 9
"__id__": 15
}
],
"_prefab": {
"__id__": 11
"__id__": 17
},
"_opacity": 255,
"_color": {
......@@ -162,20 +381,20 @@
"_name": "icon_sound",
"_objFlags": 0,
"_parent": {
"__id__": 2
"__id__": 8
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 4
"__id__": 10
},
{
"__id__": 5
"__id__": 11
}
],
"_prefab": {
"__id__": 6
"__id__": 12
},
"_opacity": 255,
"_color": {
......@@ -229,7 +448,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
"__id__": 9
},
"_enabled": true,
"_materials": [
......@@ -261,7 +480,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
"__id__": 9
},
"_enabled": true,
"_defaultClip": null,
......@@ -292,7 +511,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
"__id__": 8
},
"_enabled": true,
"_materials": [
......@@ -324,7 +543,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
"__id__": 8
},
"_enabled": true,
"alignMode": 1,
......@@ -351,7 +570,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
"__id__": 8
},
"_enabled": true,
"_normalMaterial": null,
......@@ -360,7 +579,7 @@
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 10
"__id__": 16
}
],
"_N$interactable": true,
......@@ -480,13 +699,21 @@
},
"_enabled": true,
"iconSound": {
"__id__": 3
"__id__": 9
},
"rightFrame": {
"__id__": 2
},
"particle": {
"rightPic": {
"__id__": 4
},
"particle_star": {
"__uuid__": "de39730a-d6dc-4031-9744-9ca5c01fc1f0"
},
"_opId": 0,
"_soundUrl": "",
"_opPic": null,
"_isRight": false,
"_id": ""
},
{
......@@ -505,8 +732,8 @@
},
"_size": {
"__type__": "cc.Size",
"width": 253,
"height": 218
"width": 102,
"height": 102
},
"_id": ""
},
......
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false
},
{
"__type__": "cc.Node",
"_name": "sui",
"_objFlags": 0,
"_parent": null,
"_children": [],
"_active": true,
"_components": [
{
"__id__": 2
}
],
"_prefab": {
"__id__": 3
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
571,
247,
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": ""
},
{
"__type__": "cc.ParticleSystem",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 1,
"_dstBlendFactor": 771,
"_custom": true,
"_file": {
"__uuid__": "538af702-8a0f-4265-beb1-be7a0f687356"
},
"_spriteFrame": {
"__uuid__": "fb6b1982-4305-4b8a-a83e-04ac25732105"
},
"_texture": null,
"_stopped": false,
"playOnLoad": true,
"autoRemoveOnFinish": false,
"totalParticles": 300,
"duration": -1,
"emissionRate": 80,
"life": 5,
"lifeVar": 0,
"_startColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_startColorVar": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 0
},
"_endColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_endColorVar": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 0
},
"angle": 253.4199981689453,
"angleVar": 0,
"startSize": 30,
"startSizeVar": 10,
"endSize": 30,
"endSizeVar": 10,
"startSpin": 450.37005615234375,
"startSpinVar": -1270.0657958984375,
"endSpin": 804.1529541015625,
"endSpinVar": -3600,
"sourcePos": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"posVar": {
"__type__": "cc.Vec2",
"x": 1088,
"y": 0
},
"_positionType": 1,
"positionType": 1,
"emitterMode": 0,
"gravity": {
"__type__": "cc.Vec2",
"x": 0,
"y": -100.54499816894531
},
"speed": 100,
"speedVar": 300,
"tangentialAccel": 0,
"tangentialAccelVar": 0,
"radialAccel": 0,
"radialAccelVar": 0,
"rotationIsDir": false,
"startRadius": 0,
"startRadiusVar": 0,
"endRadius": 0,
"endRadiusVar": 0,
"rotatePerS": 0,
"rotatePerSVar": 0,
"_N$preview": true,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "43HhlK8MBA455Uic/ufNlS",
"sync": false
}
]
\ No newline at end of file
{
"ver": "1.2.7",
"uuid": "d30b053b-c7eb-4811-951c-01c98b5825bf",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}
\ No newline at end of file
This diff is collapsed.
......@@ -41,6 +41,23 @@ cc.Class({
default: [],
type: [cc.AudioClip],
},
particle_paper: {
default: null,
type: cc.Node,
},
_opSoundPos: [], // 选框位置
_opPicPos: [], // 图片位置
_rightCount: 0, // 正确个数
},
onEnable() {
cc.game.on("RIGHT", this.answerRight, this);
},
onDisable() {
cc.game.off("RIGHT", this.answerRight, this);
},
// 生命周期 onLoad
......@@ -112,7 +129,7 @@ cc.Class({
getDefaultData() {
const dataJson =
'{"pic_url":"http://staging-teach.cdn.ireadabc.com/ed94332a503c31e0908bd4c6923a2665.png","pic_url_2":"http://staging-teach.cdn.ireadabc.com/5fb60317ade0195d35ad8034d5370a7f.png","text":"This is a test label.","audio_url":"http://staging-teach.cdn.ireadabc.com/f47f1d7b5c160fe1c59500d180346240.mp3"}';
'{"title":"hello","audio_title":"http://staging-teach.cdn.ireadabc.com/f7fb9f71ab7d460ac2f78c85efba7610.mp3","options":[{"pic_url":"http://staging-teach.cdn.ireadabc.com/ae96e15404c873878ed4f4ce03f9f495.jpeg","audio_url":"http://staging-teach.cdn.ireadabc.com/0f0482ddb8c0d3329165ab0612683148.mp3"},{"pic_url":"http://staging-teach.cdn.ireadabc.com/d16a95047e369fbc7f94428624859d03.jpeg","audio_url":"http://staging-teach.cdn.ireadabc.com/784cd4188bf126d6c3c9395d9a807619.mp3"},{"pic_url":"http://staging-teach.cdn.ireadabc.com/5433aa00faced2d5e02f9cecce63ba09.jpeg","audio_url":"http://staging-teach.cdn.ireadabc.com/0f0482ddb8c0d3329165ab0612683148.mp3"},{"pic_url":"http://staging-teach.cdn.ireadabc.com/9298013cc63aa40035dbd18f1f8380a8.jpeg","audio_url":"http://staging-teach.cdn.ireadabc.com/784cd4188bf126d6c3c9395d9a807619.mp3"}]}';
const data = JSON.parse(dataJson);
return data;
},
......@@ -177,13 +194,20 @@ cc.Class({
this.initBg();
this.initPic();
this.playSound(0);
// 初始化title
this.title.string = this.data.title;
this.title.node.on(cc.Node.EventType.TOUCH_START, () => {
this.playAudioByUrl(this.data.audio_title);
});
var self = this;
for (var i = 0; i < this.data.options.length; i++) {
let scale = 1;
let count = this.data.options.length - 4;
if (count > 0) {
scale = 1 - count * 0.16;
}
this.pic_container.scale = scale;
this.sounds_container.scale = scale;
for (let i = 0; i < this.data.options.length; i++) {
const op_s = cc.instantiate(this.op_sound);
op_s.getComponent("op_sound")._opId = i;
op_s.getComponent("op_sound")._soundUrl = this.data.options[i].audio_url;
......@@ -191,17 +215,32 @@ cc.Class({
const op_p = cc.instantiate(this.op_pic);
op_p.getComponent("op_pic")._opId = i;
op_p.getComponent("op_pic").setPic(this.data.options[i].pic_url);
op_p.getComponent("op_pic")._picUrl = this.data.options[i].pic_url;
this.pic_container.addChild(op_p);
op_p.getComponent("op_pic")._ori_pos = cc.v2(op_p.x, op_p.y);
}
var self = this;
this.scheduleOnce(function () {
self.pic_container.getComponent(cc.Layout).enabled = false;
}, 0.5);
self.sounds_container.getComponent(cc.Layout).enabled = false;
for (let o of this.sounds_container.children) {
this._opSoundPos.push(o.getPosition());
}
for (let o of this.pic_container.children) {
this._opPicPos.push(o.getPosition());
}
this.playSound(0);
this._opPicPos.sort(this.randomsort);
this._opSoundPos.sort(this.randomsort);
for (let i = 0; i < this.sounds_container.children.length; i++) {
this.sounds_container.children[i].setPosition(this._opSoundPos[i]);
this.pic_container.children[i].setPosition(this._opPicPos[i]);
this.pic_container.children[i].getComponent("op_pic")._ori_pos = this._opPicPos[i];
this.pic_container.children[i].getComponent("op_pic").setPic();
}
}, 0.5);
},
initBg() {
......@@ -281,12 +320,7 @@ cc.Class({
playAudioByUrl(audio_url, cb = null) {
if (audio_url) {
cc.assetManager.loadRemote(audio_url, (err, audioClip) => {
const audioId = cc.audioEngine.play(audioClip, false, 0.8);
if (cb) {
cc.audioEngine.setFinishCallback(audioId, () => {
cb();
});
}
cc.audioEngine.play(audioClip, false);
});
}
},
......@@ -296,5 +330,29 @@ cc.Class({
cc.audioEngine.playEffect(this.sounds[index], false);
},
randomsort(a, b) {
return Math.random() > 0.5 ? 1 : -1;
},
playTitle() {
cc.assetManager.loadRemote(this.data.audio_title, (err, audioClip) => {
cc.audioEngine.playEffect(audioClip, false);
});
},
answerRight() {
this._rightCount++;
if (this._rightCount == this.data.options.length) {
this.scheduleOnce(function () {
this.playSound(1);
this.particle_paper.active = true;
this.scheduleOnce(function () {
this.particle_paper.active = false;
}, 5);
}, 1);
}
},
// ------------------------------------------
});
......@@ -12,10 +12,10 @@ cc.Class({
type: cc.Sprite,
},
// 星星特效
particle_star: {
// 图片选中底图
pic_selected: {
default: null,
type: cc.Prefab,
type: cc.Node,
},
// 声音,0-正确,1-错误
......@@ -29,74 +29,64 @@ cc.Class({
_isEnter: false, // 是否碰到对的选框
_isContact: false, // 是否碰到了选项框
_soundOp: null, // 碰到的选框
_picUrl: null, // 图片地址
_spriteFrame: null,
},
onEnable() {
cc.game.on("SELECT", this.selected, this);
},
onDisable() {
cc.game.off("SELECT", this.selected, this);
},
onLoad() {
this.nodePos = this.node.getPosition();
this.scheduleOnce(function () {
this._ori_pos = this.node.getPosition();
}, 0.5);
this.node.on("touchstart", this.onTouchStart, this);
this.node.on("touchmove", this.onTouchMove, this);
this.node.on("touchend", this.onTouchEnd, this);
this.node.on("touchcancel", this.onTouchEnd, this);
},
setPic(url) {
cc.loader.load({ url }, (err, img) => {
setPic() {
cc.loader.load({ url: this._picUrl }, (err, img) => {
const spriteFrame = new cc.SpriteFrame(img);
this.pic.spriteFrame = spriteFrame;
this._spriteFrame = spriteFrame;
});
},
onTouchStart(event) {
this.pic_selected.active = true;
cc.game.emit("SELECT", this._opId);
},
//触摸移动;
onTouchMove(event) {
var self = this;
var touches = event.getTouches();
//触摸刚开始的位置
var oldPos = self.node.convertToNodeSpaceAR(touches[0].getStartLocation());
//触摸时不断变更的位置
var newPos = self.node.convertToNodeSpaceAR(touches[0].getLocation());
var subPos = oldPos.sub(newPos); // 2.X版本是 p1.sub(p2);
self.node.x = self.nodePos.x - subPos.x;
self.node.y = self.nodePos.y - subPos.y;
// 控制节点移不出屏幕;
var minX = -cc.view.getVisibleSize().width / 2 + self.node.width / 2; //最小X坐标;
var maxX = Math.abs(minX);
var minY = -cc.view.getVisibleSize().height / 2 + self.node.height / 2; //最小Y坐标;
var maxY = Math.abs(minY);
var nPos = self.node.getPosition(); //节点实时坐标;
if (nPos.x < minX) {
nPos.x = minX;
}
if (nPos.x > maxX) {
nPos.x = maxX;
}
if (nPos.y < minY) {
nPos.y = minY;
onTouchMove(touch, event) {
let delta = touch.getDelta();
this.node.x += delta.x;
this.node.y += delta.y;
if (this.pic_selected.active) {
this.pic_selected.active = false;
}
if (nPos.y > maxY) {
nPos.y = maxY;
}
self.node.setPosition(nPos);
},
onTouchEnd() {
this.nodePos = this.node.getPosition(); //获取触摸结束之后的node坐标;
if (this._isContact) {
this.node.position = this._soundOp.position;
if (this._isContact && !this._soundOp.node.getComponent("op_sound")._isRight) {
if (this._isEnter) {
console.log("enter right");
this.playSound(0);
var par = cc.instantiate(this.particle_star);
this.node.addChild(par);
this._soundOp.node.getComponent("op_sound").correct(this._spriteFrame);
this.node.destroy();
} else {
console.log("enter false");
this.playSound(1);
this.node.getComponent(cc.Animation).play("wrong");
this.scheduleOnce(function () {
this.node.setPosition(this._ori_pos);
}, 2);
this.node.active = false;
this._soundOp.node.getComponent("op_sound").wrong(this._spriteFrame);
}
} else {
this.node.setPosition(this._ori_pos);
......@@ -126,11 +116,22 @@ cc.Class({
console.log("on collision exit");
this._isEnter = false;
this._isContact = false;
this._soundOp = null;
// this._soundOp = null;
},
// 播放声音
playSound(index) {
cc.audioEngine.playEffect(this.sounds[index], false);
},
resetPos() {
this.node.setPosition(this._ori_pos);
},
selected(id) {
if (this._opId == id) {
return;
}
this.pic_selected.active = false;
},
});
......@@ -12,8 +12,28 @@ cc.Class({
type: cc.Node,
},
// 声音图标
rightFrame: {
default: null,
type: cc.Node,
},
// 声音图标
rightPic: {
default: null,
type: cc.Sprite,
},
// 星星特效
particle_star: {
default: null,
type: cc.Prefab,
},
_opId: 0, // 选项id
_soundUrl: "", // 音频文件地址
_opPic: null,
_isRight: false,
},
/**
......@@ -23,9 +43,9 @@ cc.Class({
if (this._soundUrl != "") {
cc.assetManager.loadRemote(this._soundUrl, (err, audioClip) => {
const audioId = cc.audioEngine.play(audioClip, false, 0.8);
this.iconSound.getComponent(cc.Aimation).play("icon_sound_play");
this.iconSound.getComponent(cc.Animation).play("icon_sound_play");
cc.audioEngine.setFinishCallback(audioId, () => {
this.iconSound.getComponent(cc.Aimation).play("icon_sound_finish");
this.iconSound.getComponent(cc.Animation).play("icon_sound_finish");
});
});
}
......@@ -36,7 +56,9 @@ cc.Class({
* @param {Collider} other 产生碰撞的另一个碰撞组件
* @param {Collider} self 产生碰撞的自身的碰撞组件
*/
onCollisionEnter: function (other, self) {},
onCollisionEnter: function (other, self) {
this._opPic = other;
},
/**
* 当碰撞结束后调用
......@@ -46,4 +68,42 @@ cc.Class({
onCollisionExit: function (other, self) {
console.log("on collision exit");
},
correct(spriteFrame) {
this.rightFrame.active = true;
// cc.loader.load({ url }, (err, img) => {
// const spriteFrame = new cc.SpriteFrame(img);
// this.rightPic.spriteFrame = spriteFrame;
// });
this.rightPic.spriteFrame = spriteFrame;
var par = cc.instantiate(this.particle_star);
this.node.addChild(par);
this._isRight = true;
cc.game.emit("RIGHT");
},
wrong(spriteFrame) {
this.rightFrame.active = true;
// cc.loader.load({ url }, (err, img) => {
// const spriteFrame = new cc.SpriteFrame(img);
// this.rightPic.spriteFrame = spriteFrame;
// });
this.rightPic.spriteFrame = spriteFrame;
let time = 0.1;
let action = cc.repeat(
cc.sequence(cc.moveBy(time, -10, 0), cc.moveBy(time, 10, 0), cc.moveBy(time, 10, 0), cc.moveBy(time, -10, 0)),
5
);
this.node.runAction(action);
this.scheduleOnce(function () {
this.rightFrame.active = false;
this.rightPic.spriteFrame = null;
this._opPic.node.active = true;
this._opPic.node.getComponent("op_pic").resetPos();
}, 2.2);
},
});
{
"ver": "2.3.5",
"uuid": "641b2540-061f-44f6-9248-8ffa04efb6ce",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 253,
"height": 227,
"platformSettings": {},
"subMetas": {
"pic_frame_selected": {
"ver": "1.0.4",
"uuid": "dec1094e-44d7-400e-ae82-87256133f537",
"rawTextureUuid": "641b2540-061f-44f6-9248-8ffa04efb6ce",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 4,
"trimX": 0,
"trimY": 0,
"width": 253,
"height": 219,
"rawWidth": 253,
"rawHeight": 227,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
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