Commit b7a48342 authored by Tt's avatar Tt

修改完成

parent 3faa109b
const { ccclass, property } = cc._decorator;
@ccclass
export default class Clund_06 extends cc.Component {
@property(cc.Node)
yun_1: cc.Node = null;
@property(cc.Node)
yun_2: cc.Node = null;
@property(cc.Node)
yun_3: cc.Node = null;
@property(cc.Node)
yun_4: cc.Node = null;
@property(cc.Node)
yun_5: cc.Node = null;
@property(cc.Node)
yun_6: cc.Node = null;
@property(cc.Node)
yun_7: cc.Node = null;
private speed: number;
private speed2: number;
private width: number;//背景图宽度
public onEnable() {
}
protected onDestroy(): void {
}
protected onLoad(): void {
this.speed = 0.5;
this.speed2 = 0.8;
let size = cc.view.getCanvasSize();
let scale = (size.width / size.height) / (1920 / 1080);
if (scale > 1) {
Math.floor(this.node.width *= scale);
Math.floor(this.node.width *= scale);
Math.floor(this.node.width *= scale);
}
this.width = this.node.width / 2;
}
protected update(dt) {
this.yun_1.x += this.speed;
this.yun_2.x += this.speed2;
this.yun_4.x += this.speed2;
this.yun_3.x -= this.speed;
this.yun_5.x -= this.speed2;
this.yun_6.x -= this.speed;
this.yun_7.x -= this.speed;
if (this.yun_1.x > this.width + 200)
this.yun_1.x = -this.width - 150;
if (this.yun_2.x > this.width + 200)
this.yun_2.x = -this.width - 150;
if (this.yun_4.x > this.width + 200)
this.yun_4.x = -this.width - 150;
if (this.yun_3.x < -this.width - 200)
this.yun_3.x = this.width + 150;
if (this.yun_5.x < -this.width - 200)
this.yun_5.x = this.width + 150;
if (this.yun_6.x < -this.width - 200)
this.yun_6.x = this.width + 150;
if (this.yun_7.x < -this.width - 200)
this.yun_7.x = this.width + 150;
}
}
\ No newline at end of file
{
"ver": "1.0.8",
"uuid": "2ea681a7-773b-4059-980f-f890bd1ea71e",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
......@@ -15,21 +15,22 @@ export default class boatmove extends cc.Component {
// LIFE-CYCLE CALLBACKS:
onLoad() {
let mul = 3;
if (this.firstUp) {
cc.tween(this.node).repeatForever(
cc.tween()
.by(10, { y: 25 })
.by(10, { y: -25 })
.by(10, { y: -25 })
.by(10, { y: 25 })
.by(10, { y: 25 * mul })
.by(10, { y: -25 * mul })
.by(10, { y: -25 * mul })
.by(10, { y: 25 * mul })
).start();
} else {
cc.tween(this.node).repeatForever(
cc.tween()
.by(10, { y: -25 })
.by(10, { y: 25 })
.by(10, { y: 25 })
.by(10, { y: -25 })
.by(10, { y: -25 * mul })
.by(10, { y: 25 * mul })
.by(10, { y: 25 * mul })
.by(10, { y: -25 * mul })
).start();
}
}
......
......@@ -81,37 +81,37 @@
"__id__": 37
},
{
"__id__": 63
"__id__": 58
},
{
"__id__": 130
"__id__": 127
},
{
"__id__": 132
"__id__": 129
},
{
"__id__": 138
"__id__": 135
},
{
"__id__": 140
"__id__": 137
},
{
"__id__": 165
"__id__": 162
},
{
"__id__": 184
"__id__": 181
}
],
"_active": true,
"_components": [
{
"__id__": 195
"__id__": 192
},
{
"__id__": 196
"__id__": 193
},
{
"__id__": 197
"__id__": 194
}
],
"_prefab": null,
......@@ -1730,25 +1730,28 @@
"__id__": 44
},
{
"__id__": 47
"__id__": 46
},
{
"__id__": 50
"__id__": 48
},
{
"__id__": 53
"__id__": 50
},
{
"__id__": 56
"__id__": 52
},
{
"__id__": 59
"__id__": 54
}
],
"_active": true,
"_components": [
{
"__id__": 62
"__id__": 56
},
{
"__id__": 57
}
],
"_prefab": null,
......@@ -2067,9 +2070,6 @@
"_components": [
{
"__id__": 45
},
{
"__id__": 46
}
],
"_prefab": null,
......@@ -2152,17 +2152,6 @@
"_atlas": null,
"_id": "04crTmUgpORqKU0n/997LU"
},
{
"__type__": "aaac5SL94hC06uZMQh1C3Gb",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 44
},
"_enabled": true,
"toLeft": true,
"_id": "e38+QIrnZMkLA+XUUQCw7J"
},
{
"__type__": "cc.Node",
"_name": "clound_2",
......@@ -2174,10 +2163,7 @@
"_active": true,
"_components": [
{
"__id__": 48
},
{
"__id__": 49
"__id__": 47
}
],
"_prefab": null,
......@@ -2233,7 +2219,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 47
"__id__": 46
},
"_enabled": true,
"_materials": [
......@@ -2260,17 +2246,6 @@
"_atlas": null,
"_id": "a1H7eExKdHZpw7cFKknQTR"
},
{
"__type__": "aaac5SL94hC06uZMQh1C3Gb",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 47
},
"_enabled": true,
"toLeft": true,
"_id": "e410scqzpMh6+M7doV2R9c"
},
{
"__type__": "cc.Node",
"_name": "clound_3",
......@@ -2282,10 +2257,7 @@
"_active": true,
"_components": [
{
"__id__": 51
},
{
"__id__": 52
"__id__": 49
}
],
"_prefab": null,
......@@ -2341,7 +2313,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 50
"__id__": 48
},
"_enabled": true,
"_materials": [
......@@ -2368,17 +2340,6 @@
"_atlas": null,
"_id": "1bD5ONvT5PI5YBrqSHz4yE"
},
{
"__type__": "aaac5SL94hC06uZMQh1C3Gb",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 50
},
"_enabled": true,
"toLeft": false,
"_id": "edhP/AUbJJH4rLWOOilqah"
},
{
"__type__": "cc.Node",
"_name": "clound_4",
......@@ -2390,10 +2351,7 @@
"_active": true,
"_components": [
{
"__id__": 54
},
{
"__id__": 55
"__id__": 51
}
],
"_prefab": null,
......@@ -2449,7 +2407,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 53
"__id__": 50
},
"_enabled": true,
"_materials": [
......@@ -2476,17 +2434,6 @@
"_atlas": null,
"_id": "12gwQKOYpBjZ51EUt2VJVy"
},
{
"__type__": "aaac5SL94hC06uZMQh1C3Gb",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 53
},
"_enabled": true,
"toLeft": false,
"_id": "3dAYRmH5hBwLEt0XT7Cawz"
},
{
"__type__": "cc.Node",
"_name": "clound_5",
......@@ -2498,10 +2445,7 @@
"_active": true,
"_components": [
{
"__id__": 57
},
{
"__id__": 58
"__id__": 53
}
],
"_prefab": null,
......@@ -2557,7 +2501,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 56
"__id__": 52
},
"_enabled": true,
"_materials": [
......@@ -2584,17 +2528,6 @@
"_atlas": null,
"_id": "fbf/D2xaZHiamdUt4jcbzp"
},
{
"__type__": "aaac5SL94hC06uZMQh1C3Gb",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 56
},
"_enabled": true,
"toLeft": true,
"_id": "58KKvUwDJGp5ShGl2fJuxa"
},
{
"__type__": "cc.Node",
"_name": "clound_6",
......@@ -2606,10 +2539,7 @@
"_active": true,
"_components": [
{
"__id__": 60
},
{
"__id__": 61
"__id__": 55
}
],
"_prefab": null,
......@@ -2665,7 +2595,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 59
"__id__": 54
},
"_enabled": true,
"_materials": [
......@@ -2692,17 +2622,6 @@
"_atlas": null,
"_id": "59D3X3hIpMl7hTMbrAlnG0"
},
{
"__type__": "aaac5SL94hC06uZMQh1C3Gb",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 59
},
"_enabled": true,
"toLeft": true,
"_id": "06Qj+f649JCKcGdrjq6cTT"
},
{
"__type__": "cc.Widget",
"_name": "",
......@@ -2730,6 +2649,37 @@
"_originalHeight": 750,
"_id": "fdBKweHaVKVIlFA6NbP/Bs"
},
{
"__type__": "2ea68GndztAWZgP+JC9Hqce",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 37
},
"_enabled": true,
"yun_1": {
"__id__": 44
},
"yun_2": {
"__id__": 46
},
"yun_3": {
"__id__": 48
},
"yun_4": {
"__id__": 50
},
"yun_5": {
"__id__": 52
},
"yun_6": {
"__id__": 54
},
"yun_7": {
"__id__": 44
},
"_id": "babWGwo55HNros46v8IDQr"
},
{
"__type__": "cc.Node",
"_name": "layout_bottom",
......@@ -2739,22 +2689,22 @@
},
"_children": [
{
"__id__": 64
"__id__": 59
},
{
"__id__": 93
"__id__": 88
},
{
"__id__": 94
"__id__": 89
},
{
"__id__": 112
"__id__": 108
}
],
"_active": true,
"_components": [
{
"__id__": 129
"__id__": 126
}
],
"_prefab": null,
......@@ -2810,20 +2760,20 @@
"_name": "item",
"_objFlags": 0,
"_parent": {
"__id__": 63
"__id__": 58
},
"_children": [
{
"__id__": 65
"__id__": 60
},
{
"__id__": 87
"__id__": 82
}
],
"_active": true,
"_components": [
{
"__id__": 92
"__id__": 87
}
],
"_prefab": null,
......@@ -2879,44 +2829,44 @@
"_name": "fish",
"_objFlags": 0,
"_parent": {
"__id__": 64
"__id__": 59
},
"_children": [
{
"__id__": 66
"__id__": 61
},
{
"__id__": 68
"__id__": 63
},
{
"__id__": 70
"__id__": 65
},
{
"__id__": 72
"__id__": 67
},
{
"__id__": 74
"__id__": 69
},
{
"__id__": 76
"__id__": 71
},
{
"__id__": 78
"__id__": 73
},
{
"__id__": 80
"__id__": 75
},
{
"__id__": 82
"__id__": 77
},
{
"__id__": 84
"__id__": 79
}
],
"_active": true,
"_components": [
{
"__id__": 86
"__id__": 81
}
],
"_prefab": null,
......@@ -2972,13 +2922,13 @@
"_name": "fish_1",
"_objFlags": 0,
"_parent": {
"__id__": 65
"__id__": 60
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 67
"__id__": 62
}
],
"_prefab": null,
......@@ -3034,7 +2984,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 66
"__id__": 61
},
"_enabled": true,
"_materials": [
......@@ -3074,13 +3024,13 @@
"_name": "fish_2",
"_objFlags": 0,
"_parent": {
"__id__": 65
"__id__": 60
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 69
"__id__": 64
}
],
"_prefab": null,
......@@ -3136,7 +3086,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 68
"__id__": 63
},
"_enabled": true,
"_materials": [
......@@ -3176,13 +3126,13 @@
"_name": "fish_3",
"_objFlags": 0,
"_parent": {
"__id__": 65
"__id__": 60
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 71
"__id__": 66
}
],
"_prefab": null,
......@@ -3238,7 +3188,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 70
"__id__": 65
},
"_enabled": true,
"_materials": [
......@@ -3278,13 +3228,13 @@
"_name": "fish_4",
"_objFlags": 0,
"_parent": {
"__id__": 65
"__id__": 60
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 73
"__id__": 68
}
],
"_prefab": null,
......@@ -3340,7 +3290,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 72
"__id__": 67
},
"_enabled": true,
"_materials": [
......@@ -3380,13 +3330,13 @@
"_name": "fish_5",
"_objFlags": 0,
"_parent": {
"__id__": 65
"__id__": 60
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 75
"__id__": 70
}
],
"_prefab": null,
......@@ -3442,7 +3392,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 74
"__id__": 69
},
"_enabled": true,
"_materials": [
......@@ -3482,13 +3432,13 @@
"_name": "fish_6",
"_objFlags": 0,
"_parent": {
"__id__": 65
"__id__": 60
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 77
"__id__": 72
}
],
"_prefab": null,
......@@ -3544,7 +3494,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 76
"__id__": 71
},
"_enabled": true,
"_materials": [
......@@ -3584,13 +3534,13 @@
"_name": "fish_7",
"_objFlags": 0,
"_parent": {
"__id__": 65
"__id__": 60
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 79
"__id__": 74
}
],
"_prefab": null,
......@@ -3646,7 +3596,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 78
"__id__": 73
},
"_enabled": true,
"_materials": [
......@@ -3686,13 +3636,13 @@
"_name": "fish_8",
"_objFlags": 0,
"_parent": {
"__id__": 65
"__id__": 60
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 81
"__id__": 76
}
],
"_prefab": null,
......@@ -3748,7 +3698,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 80
"__id__": 75
},
"_enabled": true,
"_materials": [
......@@ -3788,13 +3738,13 @@
"_name": "fish_9",
"_objFlags": 0,
"_parent": {
"__id__": 65
"__id__": 60
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 83
"__id__": 78
}
],
"_prefab": null,
......@@ -3850,7 +3800,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 82
"__id__": 77
},
"_enabled": true,
"_materials": [
......@@ -3890,13 +3840,13 @@
"_name": "fish_10",
"_objFlags": 0,
"_parent": {
"__id__": 65
"__id__": 60
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 85
"__id__": 80
}
],
"_prefab": null,
......@@ -3952,7 +3902,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 84
"__id__": 79
},
"_enabled": true,
"_materials": [
......@@ -3992,7 +3942,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 65
"__id__": 60
},
"_enabled": false,
"_materials": [
......@@ -4024,14 +3974,14 @@
"_name": "layout_text",
"_objFlags": 0,
"_parent": {
"__id__": 64
"__id__": 59
},
"_children": [
{
"__id__": 88
"__id__": 83
},
{
"__id__": 90
"__id__": 85
}
],
"_active": true,
......@@ -4089,13 +4039,13 @@
"_name": "bg",
"_objFlags": 0,
"_parent": {
"__id__": 87
"__id__": 82
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 89
"__id__": 84
}
],
"_prefab": null,
......@@ -4151,7 +4101,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 88
"__id__": 83
},
"_enabled": true,
"_materials": [
......@@ -4183,13 +4133,13 @@
"_name": "text",
"_objFlags": 0,
"_parent": {
"__id__": 87
"__id__": 82
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 91
"__id__": 86
}
],
"_prefab": null,
......@@ -4245,7 +4195,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 90
"__id__": 85
},
"_enabled": true,
"_materials": [
......@@ -4280,7 +4230,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 64
"__id__": 59
},
"_enabled": true,
"_normalMaterial": null,
......@@ -4341,7 +4291,7 @@
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"__id__": 64
"__id__": 59
},
"_id": "a1Avh4LwBKJKeCLMrv0hnM"
},
......@@ -4350,7 +4300,7 @@
"_name": "layout_fish",
"_objFlags": 0,
"_parent": {
"__id__": 63
"__id__": 58
},
"_children": [],
"_active": true,
......@@ -4408,23 +4358,26 @@
"_name": "boat_left",
"_objFlags": 0,
"_parent": {
"__id__": 63
"__id__": 58
},
"_children": [
{
"__id__": 95
"__id__": 90
},
{
"__id__": 98
"__id__": 91
},
{
"__id__": 108
"__id__": 94
},
{
"__id__": 104
}
],
"_active": true,
"_components": [
{
"__id__": 111
"__id__": 107
}
],
"_prefab": null,
......@@ -4477,21 +4430,14 @@
},
{
"__type__": "cc.Node",
"_name": "net",
"_name": "fishs",
"_objFlags": 0,
"_parent": {
"__id__": 94
"__id__": 89
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 96
},
{
"__id__": 97
}
],
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
......@@ -4503,20 +4449,20 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 745,
"height": 439
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 1
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
5.526,
240.519,
0,
0,
0,
0,
0,
......@@ -4538,19 +4484,84 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "a1lya+zmNF1ou+F5tWq68p"
"_id": "78T1LmHepG6LTNkGXmF8D5"
},
{
"__type__": "cc.Sprite",
"_name": "",
"__type__": "cc.Node",
"_name": "net",
"_objFlags": 0,
"node": {
"__id__": 95
"_parent": {
"__id__": 89
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
"_children": [],
"_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": 745,
"height": 439
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 1
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
5.526,
240.519,
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": "a1lya+zmNF1ou+F5tWq68p"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 91
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
......@@ -4577,7 +4588,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 95
"__id__": 91
},
"_enabled": true,
"firstUp": true,
......@@ -4588,20 +4599,20 @@
"_name": "boat",
"_objFlags": 0,
"_parent": {
"__id__": 94
"__id__": 89
},
"_children": [
{
"__id__": 99
"__id__": 95
}
],
"_active": true,
"_components": [
{
"__id__": 106
"__id__": 102
},
{
"__id__": 107
"__id__": 103
}
],
"_prefab": null,
......@@ -4657,17 +4668,17 @@
"_name": "voice",
"_objFlags": 0,
"_parent": {
"__id__": 98
"__id__": 94
},
"_children": [
{
"__id__": 100
"__id__": 96
},
{
"__id__": 102
"__id__": 98
},
{
"__id__": 104
"__id__": 100
}
],
"_active": false,
......@@ -4725,13 +4736,13 @@
"_name": "v1",
"_objFlags": 0,
"_parent": {
"__id__": 99
"__id__": 95
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 101
"__id__": 97
}
],
"_prefab": null,
......@@ -4787,7 +4798,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 100
"__id__": 96
},
"_enabled": true,
"_materials": [
......@@ -4819,13 +4830,13 @@
"_name": "v2",
"_objFlags": 0,
"_parent": {
"__id__": 99
"__id__": 95
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 103
"__id__": 99
}
],
"_prefab": null,
......@@ -4881,7 +4892,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 102
"__id__": 98
},
"_enabled": true,
"_materials": [
......@@ -4913,13 +4924,13 @@
"_name": "v3",
"_objFlags": 0,
"_parent": {
"__id__": 99
"__id__": 95
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 105
"__id__": 101
}
],
"_prefab": null,
......@@ -4975,7 +4986,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 104
"__id__": 100
},
"_enabled": true,
"_materials": [
......@@ -5007,7 +5018,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 98
"__id__": 94
},
"_enabled": true,
"_materials": [
......@@ -5047,7 +5058,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 98
"__id__": 94
},
"_enabled": true,
"_normalMaterial": null,
......@@ -5108,7 +5119,7 @@
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"__id__": 98
"__id__": 94
},
"_id": "22jYvkMwtPYqNNI2jFKpz8"
},
......@@ -5117,16 +5128,16 @@
"_name": "text",
"_objFlags": 0,
"_parent": {
"__id__": 94
"__id__": 89
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 109
"__id__": 105
},
{
"__id__": 110
"__id__": 106
}
],
"_prefab": null,
......@@ -5182,7 +5193,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 108
"__id__": 104
},
"_enabled": true,
"_materials": [
......@@ -5217,7 +5228,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 108
"__id__": 104
},
"_enabled": true,
"_color": {
......@@ -5235,7 +5246,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 94
"__id__": 89
},
"_enabled": true,
"firstUp": true,
......@@ -5246,23 +5257,26 @@
"_name": "boat_right",
"_objFlags": 0,
"_parent": {
"__id__": 63
"__id__": 58
},
"_children": [
{
"__id__": 113
"__id__": 109
},
{
"__id__": 116
"__id__": 110
},
{
"__id__": 125
"__id__": 113
},
{
"__id__": 122
}
],
"_active": true,
"_components": [
{
"__id__": 128
"__id__": 125
}
],
"_prefab": null,
......@@ -5313,21 +5327,79 @@
"groupIndex": 0,
"_id": "6eoMaiRmBOQb7D1FZDJaIS"
},
{
"__type__": "cc.Node",
"_name": "fishs",
"_objFlags": 0,
"_parent": {
"__id__": 108
},
"_children": [],
"_active": true,
"_components": [],
"_prefab": null,
"_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": [
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": "46WRxEroZNTq0PqNxOfnVK"
},
{
"__type__": "cc.Node",
"_name": "net",
"_objFlags": 0,
"_parent": {
"__id__": 112
"__id__": 108
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 114
"__id__": 111
},
{
"__id__": 115
"__id__": 112
}
],
"_prefab": null,
......@@ -5383,7 +5455,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 113
"__id__": 110
},
"_enabled": true,
"_materials": [
......@@ -5415,7 +5487,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 113
"__id__": 110
},
"_enabled": true,
"firstUp": false,
......@@ -5426,17 +5498,17 @@
"_name": "boat",
"_objFlags": 0,
"_parent": {
"__id__": 112
"__id__": 108
},
"_children": [
{
"__id__": 117
"__id__": 114
}
],
"_active": true,
"_components": [
{
"__id__": 124
"__id__": 121
}
],
"_prefab": null,
......@@ -5492,17 +5564,17 @@
"_name": "voice",
"_objFlags": 0,
"_parent": {
"__id__": 116
"__id__": 113
},
"_children": [
{
"__id__": 118
"__id__": 115
},
{
"__id__": 120
"__id__": 117
},
{
"__id__": 122
"__id__": 119
}
],
"_active": false,
......@@ -5560,13 +5632,13 @@
"_name": "v1",
"_objFlags": 0,
"_parent": {
"__id__": 117
"__id__": 114
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 119
"__id__": 116
}
],
"_prefab": null,
......@@ -5622,7 +5694,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 118
"__id__": 115
},
"_enabled": true,
"_materials": [
......@@ -5654,13 +5726,13 @@
"_name": "v2",
"_objFlags": 0,
"_parent": {
"__id__": 117
"__id__": 114
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 121
"__id__": 118
}
],
"_prefab": null,
......@@ -5716,7 +5788,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 120
"__id__": 117
},
"_enabled": true,
"_materials": [
......@@ -5748,13 +5820,13 @@
"_name": "v3",
"_objFlags": 0,
"_parent": {
"__id__": 117
"__id__": 114
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 123
"__id__": 120
}
],
"_prefab": null,
......@@ -5810,7 +5882,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 122
"__id__": 119
},
"_enabled": true,
"_materials": [
......@@ -5842,7 +5914,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 116
"__id__": 113
},
"_enabled": true,
"_materials": [
......@@ -5882,16 +5954,16 @@
"_name": "text",
"_objFlags": 0,
"_parent": {
"__id__": 112
"__id__": 108
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 126
"__id__": 123
},
{
"__id__": 127
"__id__": 124
}
],
"_prefab": null,
......@@ -5947,7 +6019,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 125
"__id__": 122
},
"_enabled": true,
"_materials": [
......@@ -5982,7 +6054,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 125
"__id__": 122
},
"_enabled": true,
"_color": {
......@@ -6000,7 +6072,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 112
"__id__": 108
},
"_enabled": true,
"firstUp": false,
......@@ -6011,7 +6083,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 63
"__id__": 58
},
"_enabled": true,
"alignMode": 1,
......@@ -6044,7 +6116,7 @@
"_active": true,
"_components": [
{
"__id__": 131
"__id__": 128
}
],
"_prefab": null,
......@@ -6100,7 +6172,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 130
"__id__": 127
},
"_enabled": true,
"alignMode": 1,
......@@ -6131,16 +6203,16 @@
},
"_children": [
{
"__id__": 133
"__id__": 130
},
{
"__id__": 135
"__id__": 132
}
],
"_active": false,
"_components": [
{
"__id__": 137
"__id__": 134
}
],
"_prefab": null,
......@@ -6196,13 +6268,13 @@
"_name": "touch",
"_objFlags": 0,
"_parent": {
"__id__": 132
"__id__": 129
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 134
"__id__": 131
}
],
"_prefab": null,
......@@ -6258,7 +6330,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 133
"__id__": 130
},
"_enabled": true,
"_normalMaterial": null,
......@@ -6326,13 +6398,13 @@
"_name": "label",
"_objFlags": 0,
"_parent": {
"__id__": 132
"__id__": 129
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 136
"__id__": 133
}
],
"_prefab": null,
......@@ -6388,7 +6460,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 135
"__id__": 132
},
"_enabled": true,
"_materials": [
......@@ -6421,7 +6493,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 132
"__id__": 129
},
"_enabled": true,
"_materials": [
......@@ -6459,7 +6531,7 @@
"_active": false,
"_components": [
{
"__id__": 139
"__id__": 136
}
],
"_prefab": null,
......@@ -6515,7 +6587,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 138
"__id__": 135
},
"_enabled": true,
"_materials": [
......@@ -6551,23 +6623,23 @@
},
"_children": [
{
"__id__": 141
"__id__": 138
},
{
"__id__": 145
"__id__": 142
}
],
"_active": true,
"_components": [
{
"__id__": 162
"__id__": 159
},
{
"__id__": 163
"__id__": 160
}
],
"_prefab": {
"__id__": 164
"__id__": 161
},
"_opacity": 255,
"_color": {
......@@ -6621,20 +6693,20 @@
"_name": "label_title",
"_objFlags": 0,
"_parent": {
"__id__": 140
"__id__": 137
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 142
"__id__": 139
},
{
"__id__": 143
"__id__": 140
}
],
"_prefab": {
"__id__": 144
"__id__": 141
},
"_opacity": 255,
"_color": {
......@@ -6646,8 +6718,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 92,
"height": 57.96
"width": 90.52,
"height": 46
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -6688,7 +6760,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 141
"__id__": 138
},
"_enabled": true,
"_materials": [
......@@ -6703,7 +6775,9 @@
"_fontSize": 46,
"_lineHeight": 46,
"_enableWrapText": true,
"_N$file": null,
"_N$file": {
"__uuid__": "e6bb5f58-11fc-4474-951d-d9fedbb5321c"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
......@@ -6713,7 +6787,7 @@
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_N$cacheMode": 2,
"_id": "f5eCAuH+JIMpP9NAa884Vg"
},
{
......@@ -6721,7 +6795,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 141
"__id__": 138
},
"_enabled": true,
"alignMode": 1,
......@@ -6729,7 +6803,7 @@
"_alignFlags": 9,
"_left": 120,
"_right": 0,
"_top": 18.02,
"_top": 24,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
......@@ -6746,7 +6820,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 140
"__id__": 137
},
"asset": {
"__uuid__": "95e7414b-cea3-4467-bc48-5fd920880222"
......@@ -6759,21 +6833,21 @@
"_name": "layout_mouse",
"_objFlags": 0,
"_parent": {
"__id__": 140
"__id__": 137
},
"_children": [
{
"__id__": 146
"__id__": 143
}
],
"_active": true,
"_components": [
{
"__id__": 160
"__id__": 157
}
],
"_prefab": {
"__id__": 161
"__id__": 158
},
"_opacity": 255,
"_color": {
......@@ -6827,9 +6901,12 @@
"_name": "img",
"_objFlags": 0,
"_parent": {
"__id__": 145
"__id__": 142
},
"_children": [
{
"__id__": 144
},
{
"__id__": 147
},
......@@ -6838,15 +6915,12 @@
},
{
"__id__": 153
},
{
"__id__": 156
}
],
"_active": false,
"_components": [],
"_prefab": {
"__id__": 159
"__id__": 156
},
"_opacity": 255,
"_color": {
......@@ -6900,17 +6974,17 @@
"_name": "star_bg",
"_objFlags": 0,
"_parent": {
"__id__": 146
"__id__": 143
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 148
"__id__": 145
}
],
"_prefab": {
"__id__": 149
"__id__": 146
},
"_opacity": 255,
"_color": {
......@@ -6964,7 +7038,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 147
"__id__": 144
},
"_enabled": true,
"_materials": [
......@@ -6994,7 +7068,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 140
"__id__": 137
},
"asset": {
"__uuid__": "95e7414b-cea3-4467-bc48-5fd920880222"
......@@ -7007,17 +7081,17 @@
"_name": "star",
"_objFlags": 0,
"_parent": {
"__id__": 146
"__id__": 143
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 151
"__id__": 148
}
],
"_prefab": {
"__id__": 152
"__id__": 149
},
"_opacity": 255,
"_color": {
......@@ -7071,7 +7145,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 150
"__id__": 147
},
"_enabled": true,
"_materials": [
......@@ -7101,7 +7175,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 140
"__id__": 137
},
"asset": {
"__uuid__": "95e7414b-cea3-4467-bc48-5fd920880222"
......@@ -7114,17 +7188,17 @@
"_name": "icon_bigstar",
"_objFlags": 0,
"_parent": {
"__id__": 146
"__id__": 143
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 154
"__id__": 151
}
],
"_prefab": {
"__id__": 155
"__id__": 152
},
"_opacity": 255,
"_color": {
......@@ -7178,7 +7252,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 153
"__id__": 150
},
"_enabled": true,
"_materials": [
......@@ -7208,7 +7282,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 140
"__id__": 137
},
"asset": {
"__uuid__": "95e7414b-cea3-4467-bc48-5fd920880222"
......@@ -7221,17 +7295,17 @@
"_name": "star_wrong",
"_objFlags": 0,
"_parent": {
"__id__": 146
"__id__": 143
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 157
"__id__": 154
}
],
"_prefab": {
"__id__": 158
"__id__": 155
},
"_opacity": 255,
"_color": {
......@@ -7285,7 +7359,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 156
"__id__": 153
},
"_enabled": true,
"_materials": [
......@@ -7315,7 +7389,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 140
"__id__": 137
},
"asset": {
"__uuid__": "95e7414b-cea3-4467-bc48-5fd920880222"
......@@ -7326,7 +7400,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 140
"__id__": 137
},
"asset": {
"__uuid__": "95e7414b-cea3-4467-bc48-5fd920880222"
......@@ -7339,7 +7413,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 145
"__id__": 142
},
"_enabled": true,
"position": {
......@@ -7358,7 +7432,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 140
"__id__": 137
},
"asset": {
"__uuid__": "95e7414b-cea3-4467-bc48-5fd920880222"
......@@ -7371,7 +7445,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 140
"__id__": 137
},
"_enabled": true,
"_materials": [
......@@ -7403,7 +7477,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 140
"__id__": 137
},
"_enabled": true,
"alignMode": 1,
......@@ -7428,7 +7502,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 140
"__id__": 137
},
"asset": {
"__uuid__": "95e7414b-cea3-4467-bc48-5fd920880222"
......@@ -7445,26 +7519,26 @@
},
"_children": [
{
"__id__": 166
"__id__": 163
},
{
"__id__": 171
"__id__": 168
},
{
"__id__": 174
"__id__": 171
},
{
"__id__": 178
"__id__": 175
}
],
"_active": false,
"_components": [
{
"__id__": 182
"__id__": 179
}
],
"_prefab": {
"__id__": 183
"__id__": 180
},
"_opacity": 255,
"_color": {
......@@ -7518,23 +7592,23 @@
"_name": "New Sprite(Splash)",
"_objFlags": 0,
"_parent": {
"__id__": 165
"__id__": 162
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 167
"__id__": 164
},
{
"__id__": 168
"__id__": 165
},
{
"__id__": 169
"__id__": 166
}
],
"_prefab": {
"__id__": 170
"__id__": 167
},
"_opacity": 175,
"_color": {
......@@ -7588,7 +7662,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 166
"__id__": 163
},
"_enabled": true,
"_materials": [
......@@ -7620,7 +7694,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 166
"__id__": 163
},
"_enabled": true,
"alignMode": 1,
......@@ -7647,7 +7721,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 166
"__id__": 163
},
"_enabled": true,
"_normalMaterial": null,
......@@ -7713,7 +7787,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 165
"__id__": 162
},
"asset": {
"__uuid__": "4e3ba6ba-17d6-4285-beb3-d5f8c90cc1f1"
......@@ -7726,17 +7800,17 @@
"_name": "finish_db",
"_objFlags": 0,
"_parent": {
"__id__": 165
"__id__": 162
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 172
"__id__": 169
}
],
"_prefab": {
"__id__": 173
"__id__": 170
},
"_opacity": 255,
"_color": {
......@@ -7790,7 +7864,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 171
"__id__": 168
},
"_enabled": true,
"_materials": [
......@@ -7828,7 +7902,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 165
"__id__": 162
},
"asset": {
"__uuid__": "4e3ba6ba-17d6-4285-beb3-d5f8c90cc1f1"
......@@ -7841,20 +7915,20 @@
"_name": "btn_again",
"_objFlags": 0,
"_parent": {
"__id__": 165
"__id__": 162
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 175
"__id__": 172
},
{
"__id__": 176
"__id__": 173
}
],
"_prefab": {
"__id__": 177
"__id__": 174
},
"_opacity": 255,
"_color": {
......@@ -7908,7 +7982,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 174
"__id__": 171
},
"_enabled": true,
"_materials": [
......@@ -7940,7 +8014,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 174
"__id__": 171
},
"_enabled": true,
"_normalMaterial": null,
......@@ -8006,7 +8080,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 165
"__id__": 162
},
"asset": {
"__uuid__": "4e3ba6ba-17d6-4285-beb3-d5f8c90cc1f1"
......@@ -8019,20 +8093,20 @@
"_name": "btn_next",
"_objFlags": 0,
"_parent": {
"__id__": 165
"__id__": 162
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 179
"__id__": 176
},
{
"__id__": 180
"__id__": 177
}
],
"_prefab": {
"__id__": 181
"__id__": 178
},
"_opacity": 255,
"_color": {
......@@ -8086,7 +8160,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 178
"__id__": 175
},
"_enabled": true,
"_materials": [
......@@ -8118,7 +8192,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 178
"__id__": 175
},
"_enabled": true,
"_normalMaterial": null,
......@@ -8184,7 +8258,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 165
"__id__": 162
},
"asset": {
"__uuid__": "4e3ba6ba-17d6-4285-beb3-d5f8c90cc1f1"
......@@ -8197,7 +8271,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 165
"__id__": 162
},
"_enabled": true,
"alignMode": 1,
......@@ -8222,7 +8296,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 165
"__id__": 162
},
"asset": {
"__uuid__": "4e3ba6ba-17d6-4285-beb3-d5f8c90cc1f1"
......@@ -8239,20 +8313,20 @@
},
"_children": [
{
"__id__": 185
"__id__": 182
},
{
"__id__": 190
"__id__": 187
}
],
"_active": false,
"_components": [
{
"__id__": 193
"__id__": 190
}
],
"_prefab": {
"__id__": 194
"__id__": 191
},
"_opacity": 255,
"_color": {
......@@ -8306,23 +8380,23 @@
"_name": "New Sprite(Splash)",
"_objFlags": 0,
"_parent": {
"__id__": 184
"__id__": 181
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 186
"__id__": 183
},
{
"__id__": 187
"__id__": 184
},
{
"__id__": 188
"__id__": 185
}
],
"_prefab": {
"__id__": 189
"__id__": 186
},
"_opacity": 110,
"_color": {
......@@ -8376,7 +8450,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 185
"__id__": 182
},
"_enabled": true,
"_materials": [
......@@ -8408,7 +8482,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 185
"__id__": 182
},
"_enabled": true,
"_normalMaterial": null,
......@@ -8476,7 +8550,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 185
"__id__": 182
},
"_enabled": true,
"alignMode": 1,
......@@ -8501,7 +8575,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 184
"__id__": 181
},
"asset": {
"__uuid__": "424614db-81ce-4c87-bc56-e9bb460b2aaa"
......@@ -8514,17 +8588,17 @@
"_name": "start_ske",
"_objFlags": 0,
"_parent": {
"__id__": 184
"__id__": 181
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 191
"__id__": 188
}
],
"_prefab": {
"__id__": 192
"__id__": 189
},
"_opacity": 255,
"_color": {
......@@ -8578,7 +8652,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 190
"__id__": 187
},
"_enabled": true,
"_materials": [
......@@ -8612,7 +8686,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 184
"__id__": 181
},
"asset": {
"__uuid__": "424614db-81ce-4c87-bc56-e9bb460b2aaa"
......@@ -8625,7 +8699,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 184
"__id__": 181
},
"_enabled": true,
"alignMode": 1,
......@@ -8650,7 +8724,7 @@
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 184
"__id__": 181
},
"asset": {
"__uuid__": "424614db-81ce-4c87-bc56-e9bb460b2aaa"
......@@ -8711,10 +8785,10 @@
},
"_enabled": true,
"layout_start": {
"__id__": 184
"__id__": 181
},
"layout_finish": {
"__id__": 165
"__id__": 162
},
"_id": "eaTVUpqahPfZeO9+sUI7RP"
}
......
......@@ -20,7 +20,14 @@ export default class SceneComponent extends MyCocosSceneComponent {
addPreloadAudio() {
// TODO 根据自己的配置预加载音频资源
this._audioResList.push({ url: this.data.audio_url });
// this._audioResList.push({ url: this.data.audio_url });
let arr = [];
this.data.questions.forEach(question => {
question.options.forEach(op => {
arr.push({ url: op.audio })
})
})
this._audioResList.push(...arr);
}
addPreloadAnima() {
......@@ -127,9 +134,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
let db = start_ske.getComponent(dragonBones.ArmatureDisplay);
let anis = db.getAnimationNames(db.armatureName);
db.playAnimation(anis[0], 0);
cc.tween(start_ske).by(1, { x: -500 }).call(() => {
cc.tween(start_ske).by(0.5, { x: -500 }).call(() => {
pg.audio.playAudioByUrl(Game.getIns().startAudio).then(() => {
cc.tween(start_ske).delay(1).by(1, { x: 500 }).call(() => {
cc.tween(start_ske).delay(1).by(0.5, { x: 500 }).call(() => {
this.layout_start.active = false;
resolve('');
}).start();
......@@ -173,14 +180,23 @@ export default class SceneComponent extends MyCocosSceneComponent {
// 出现鱼
let fishList = Game.getIns().getFishList();
let layout_fish = pg.view.find(this, 'layout_bottom/layout_fish')
let fishs_left = pg.view.find(this, 'layout_bottom/boat_left/fishs')
let fishs_right = pg.view.find(this, 'layout_bottom/boat_right/fishs')
layout_fish.removeAllChildren();
fishs_left.removeAllChildren();
fishs_right.removeAllChildren();
let item = pg.view.find(this, 'layout_bottom/item')
for (let i = 0; i < 10; i++) {
fishList.sort((A, B) => {
return 0.5 - Math.random();
})
}
fishList.forEach((fish, index) => {
let node = cc.instantiate(item);
layout_fish.addChild(node);
this.scheduleOnce(() => {
this.updateItem(node, fish);
}, index * Math.random())
}, index * 12)
});
}
updateItem(item, data: Option) {
......@@ -200,31 +216,27 @@ export default class SceneComponent extends MyCocosSceneComponent {
item.y = -315 - Math.random() * 150;
item.scaleX = -1;
text.scaleX = -1;
this.scheduleOnce(() => {
item.active = true;
cc.tween(item).repeatForever(cc.tween().by(21 + (data.id % 10), { x: 1920 + 400 }).call(() => {
item.scaleX = -item.scaleX;
text.scaleX = -text.scaleX;
}).by(7 + Math.random() * 8, { x: - 1920 - 400 }).call(() => {
item.scaleX = -item.scaleX;
text.scaleX = -text.scaleX;
})).start();
}, data.id % 10)
item.active = true;
cc.tween(item).repeatForever(cc.tween().by(21 * 3, { x: 1920 + 400 }).call(() => {
item.scaleX = -item.scaleX;
text.scaleX = -text.scaleX;
}).by(21 * 3, { x: - 1920 - 400 }).call(() => {
item.scaleX = -item.scaleX;
text.scaleX = -text.scaleX;
})).start();
} else {
item.x = 1920 / 2 + Math.random() * 200
item.y = -315 - Math.random() * 150;
item.scaleX = 1;
text.scaleX = 1;
this.scheduleOnce(() => {
item.active = true;
cc.tween(item).repeatForever(cc.tween().by(21 + (data.id % 10), { x: -1920 - 400 }).call(() => {
item.scaleX = -item.scaleX;
text.scaleX = -text.scaleX;
}).by(7 + Math.random() * 8, { x: 1920 + 400 }).call(() => {
item.scaleX = -item.scaleX;
text.scaleX = -text.scaleX;
})).start();
}, data.id % 10)
item.active = true;
cc.tween(item).repeatForever(cc.tween().by(21 * 3, { x: -1920 - 400 }).call(() => {
item.scaleX = -item.scaleX;
text.scaleX = -text.scaleX;
}).by(21 * 3, { x: 1920 + 400 }).call(() => {
item.scaleX = -item.scaleX;
text.scaleX = -text.scaleX;
})).start();
}
item.on(cc.Node.EventType.TOUCH_START, this.onItemTouchStart, this);
item.on(cc.Node.EventType.TOUCH_MOVE, this.onItemTouchMove, this);
......@@ -270,11 +282,17 @@ export default class SceneComponent extends MyCocosSceneComponent {
let isRight = false;
let currentRect = null;
let parent = null;
let netLeft = false;
if (rect.intersects(leftRect)) {
parent = boat_left;
netLeft = true;
isRight = !!Game.getIns().boatLeft.isChild(data);
isRight && Game.getIns().boatLeft.setRight(data);
currentRect = leftRect;
} else if (rect.intersects(rightRect)) {
parent = boat_right;
netLeft = false;
isRight = !!Game.getIns().boatRight.isChild(data);
isRight && Game.getIns().boatRight.setRight(data);
currentRect = rightRect;
......@@ -304,7 +322,17 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.touching = null;
}
})
let fishs_left = pg.view.find(this, 'layout_bottom/boat_left/fishs')
let fishs_right = pg.view.find(this, 'layout_bottom/boat_right/fishs')
if (netLeft) {
item.x = item.x + 442;
item.y = item.y - boat_left.y;
item.parent = fishs_left;
} else {
item.x = item.x - 452;
item.y = item.y - boat_right.y;
item.parent = fishs_right;
}
if (item.scaleX == -1) {
// 计算当前坐标距离最左侧的距离
let space = currentRect.width - ((rect.x + rect.width) - currentRect.x) - lastArea / 5;
......
......@@ -58,8 +58,11 @@ export default class Ngt_star_7 extends cc.Component {
this.bigStarArr = [];
let size = cc.view.getCanvasSize();
let scale = (1920 / 1080) / (size.width / size.height);
let baseX = this.position.x;
let baseY = this.position.y;
let baseY = this.position.y * scale + 15;
if (scale <= 1) baseY = this.position.y;
let disW = 80;// * this._mapScaleMin
// let disH = 80 * this._mapScaleMin;
let disScale = 1;
......
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