Commit 828ebdc3 authored by Tt's avatar Tt

电池完成

parent c7e07b31
{
"ver": "2.0.1",
"uuid": "d9005b3f-48e6-4f3f-89d4-0d554e5badc2",
"downloadMode": 0,
"duration": 1.880816,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "69587344-7bb2-4de2-bb77-6332cf7c8a85",
"downloadMode": 0,
"duration": 1.9346,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "3cb2ea31-aef0-4ba5-8575-0af1a99dccee",
"uuid": "264c5afb-d4da-4369-9909-bf9608b19ee7",
"downloadMode": 0,
"duration": 1.48898,
"subMetas": {}
......
{
"ver": "2.0.1",
"uuid": "45d19155-b425-40f9-8f22-28081fe78a5f",
"downloadMode": 0,
"duration": 2.821224,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "7f3f5b5c-1d1b-4f98-a7fd-b733ea11c96e",
"downloadMode": 0,
"duration": 0.428,
"subMetas": {}
}
\ No newline at end of file
// Learn TypeScript:
// - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
// - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
// - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
const { ccclass, property } = cc._decorator;
@ccclass
export default class NewClass extends cc.Component {
private img_1: cc.Node;
private img_2: cc.Node;
private count: number;
onLoad() {
this.count = 0;
this.img_1 = this.node.getChildByName('img_1')
this.img_2 = this.node.getChildByName('img_2')
this.img_1.active = true;
this.img_2.active = true;
cc.tween(this.img_1).repeatForever(
cc.tween().to(0.25, { opacity: 0 }).to(0.25, { opacity: 255 })
).start();
this.scheduleOnce(() => {
cc.tween(this.img_2).repeatForever(
cc.tween().to(0.25, { opacity: 0 }).to(0.25, { opacity: 255 })
).start();
}, 0.1)
}
update(dt) {
}
}
{
"ver": "1.0.8",
"uuid": "f060d304-ea8f-4da5-9d6c-ae787b0b008d",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
// Learn TypeScript:
// - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
// - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
// - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
const { ccclass, property } = cc._decorator;
@ccclass
export default class NewClass extends cc.Component {
onLoad() {
let time1 = Math.random() + 1;
let time2 = Math.random() + 1;
cc.tween(this.node).repeatForever(
cc.tween().to(time1, { opacity: 50 }).to(time2, { opacity: 255 })
).start();
}
}
{
"ver": "1.0.8",
"uuid": "cd5bc223-43eb-432d-b7dd-55c412c59aa5",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
......@@ -78,49 +78,49 @@
"__id__": 7
},
{
"__id__": 33
"__id__": 40
},
{
"__id__": 48
"__id__": 59
},
{
"__id__": 49
"__id__": 60
},
{
"__id__": 50
"__id__": 61
},
{
"__id__": 52
"__id__": 63
},
{
"__id__": 54
"__id__": 65
},
{
"__id__": 62
"__id__": 73
},
{
"__id__": 80
"__id__": 91
},
{
"__id__": 85
"__id__": 97
},
{
"__id__": 90
"__id__": 103
},
{
"__id__": 98
"__id__": 111
}
],
"_active": true,
"_components": [
{
"__id__": 114
"__id__": 129
},
{
"__id__": 115
"__id__": 130
},
{
"__id__": 116
"__id__": 131
}
],
"_prefab": null,
......@@ -378,31 +378,31 @@
"__id__": 11
},
{
"__id__": 14
"__id__": 15
},
{
"__id__": 17
"__id__": 19
},
{
"__id__": 20
"__id__": 23
},
{
"__id__": 23
"__id__": 27
},
{
"__id__": 26
"__id__": 31
},
{
"__id__": 28
"__id__": 34
}
],
"_active": true,
"_components": [
{
"__id__": 31
"__id__": 38
},
{
"__id__": 32
"__id__": 39
}
],
"_prefab": null,
......@@ -592,6 +592,9 @@
},
{
"__id__": 13
},
{
"__id__": 14
}
],
"_prefab": null,
......@@ -701,6 +704,16 @@
"_originalHeight": 0,
"_id": "267eIeP45A9IE6tfTItGyt"
},
{
"__type__": "cd5bcIjQ+tDLbfdVcQSxZql",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 11
},
"_enabled": true,
"_id": "b7swakFDRNErYTv6wepj1Z"
},
{
"__type__": "cc.Node",
"_name": "img_star",
......@@ -712,10 +725,13 @@
"_active": true,
"_components": [
{
"__id__": 15
"__id__": 16
},
{
"__id__": 16
"__id__": 17
},
{
"__id__": 18
}
],
"_prefab": null,
......@@ -771,7 +787,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 14
"__id__": 15
},
"_enabled": true,
"_materials": [
......@@ -803,7 +819,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 14
"__id__": 15
},
"_enabled": true,
"alignMode": 1,
......@@ -825,6 +841,16 @@
"_originalHeight": 0,
"_id": "30gtbu5X1HEq26T90TfvdZ"
},
{
"__type__": "cd5bcIjQ+tDLbfdVcQSxZql",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 15
},
"_enabled": true,
"_id": "2d1rXYcUlJNofYDuxy/cM6"
},
{
"__type__": "cc.Node",
"_name": "img_star",
......@@ -836,10 +862,13 @@
"_active": true,
"_components": [
{
"__id__": 18
"__id__": 20
},
{
"__id__": 19
"__id__": 21
},
{
"__id__": 22
}
],
"_prefab": null,
......@@ -895,7 +924,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 17
"__id__": 19
},
"_enabled": true,
"_materials": [
......@@ -927,7 +956,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 17
"__id__": 19
},
"_enabled": true,
"alignMode": 1,
......@@ -949,6 +978,16 @@
"_originalHeight": 0,
"_id": "adJqQvHApJqZH2nyaXD9yR"
},
{
"__type__": "cd5bcIjQ+tDLbfdVcQSxZql",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 19
},
"_enabled": true,
"_id": "b1JnNK+YVGkpTo9DVhY0Z4"
},
{
"__type__": "cc.Node",
"_name": "img_star",
......@@ -960,10 +999,13 @@
"_active": true,
"_components": [
{
"__id__": 21
"__id__": 24
},
{
"__id__": 22
"__id__": 25
},
{
"__id__": 26
}
],
"_prefab": null,
......@@ -1019,7 +1061,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 20
"__id__": 23
},
"_enabled": true,
"_materials": [
......@@ -1051,7 +1093,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 20
"__id__": 23
},
"_enabled": true,
"alignMode": 1,
......@@ -1073,6 +1115,16 @@
"_originalHeight": 0,
"_id": "baI1KlZ1FH95tGqPYQUZiC"
},
{
"__type__": "cd5bcIjQ+tDLbfdVcQSxZql",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 23
},
"_enabled": true,
"_id": "78hZHpJZlARbzSfm1IYsjP"
},
{
"__type__": "cc.Node",
"_name": "img_star",
......@@ -1084,10 +1136,13 @@
"_active": true,
"_components": [
{
"__id__": 24
"__id__": 28
},
{
"__id__": 25
"__id__": 29
},
{
"__id__": 30
}
],
"_prefab": null,
......@@ -1143,7 +1198,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 23
"__id__": 27
},
"_enabled": true,
"_materials": [
......@@ -1175,7 +1230,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 23
"__id__": 27
},
"_enabled": true,
"alignMode": 1,
......@@ -1197,6 +1252,16 @@
"_originalHeight": 0,
"_id": "67SRkuLVRDPaODlqgFJmcX"
},
{
"__type__": "cd5bcIjQ+tDLbfdVcQSxZql",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 27
},
"_enabled": true,
"_id": "9dyk71wVFOK6cQHp3Xi43B"
},
{
"__type__": "cc.Node",
"_name": "img_star",
......@@ -1208,7 +1273,10 @@
"_active": true,
"_components": [
{
"__id__": 27
"__id__": 32
},
{
"__id__": 33
}
],
"_prefab": null,
......@@ -1264,7 +1332,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 26
"__id__": 31
},
"_enabled": true,
"_materials": [
......@@ -1291,6 +1359,16 @@
"_atlas": null,
"_id": "c5cJMCpcNPcJGAF+OoI3Jw"
},
{
"__type__": "cd5bcIjQ+tDLbfdVcQSxZql",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 31
},
"_enabled": true,
"_id": "ffSZ01z01GN6jm4xm7aLjU"
},
{
"__type__": "cc.Node",
"_name": "img_star",
......@@ -1302,10 +1380,13 @@
"_active": true,
"_components": [
{
"__id__": 29
"__id__": 35
},
{
"__id__": 30
"__id__": 36
},
{
"__id__": 37
}
],
"_prefab": null,
......@@ -1361,7 +1442,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 28
"__id__": 34
},
"_enabled": true,
"_materials": [
......@@ -1393,7 +1474,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 28
"__id__": 34
},
"_enabled": true,
"alignMode": 1,
......@@ -1415,6 +1496,16 @@
"_originalHeight": 0,
"_id": "1brRVlWsBI3Z02Zf9cQq8j"
},
{
"__type__": "cd5bcIjQ+tDLbfdVcQSxZql",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 34
},
"_enabled": true,
"_id": "26nPysEcNEX48eq3+PVZfy"
},
{
"__type__": "cc.Sprite",
"_name": "",
......@@ -1483,10 +1574,10 @@
},
"_children": [
{
"__id__": 34
"__id__": 41
},
{
"__id__": 38
"__id__": 49
}
],
"_active": true,
......@@ -1544,17 +1635,23 @@
"_name": "layout_canvas",
"_objFlags": 0,
"_parent": {
"__id__": 33
"__id__": 40
},
"_children": [
{
"__id__": 35
"__id__": 42
},
{
"__id__": 44
},
{
"__id__": 46
}
],
"_active": true,
"_components": [
{
"__id__": 37
"__id__": 48
}
],
"_prefab": null,
......@@ -1610,13 +1707,13 @@
"_name": "img",
"_objFlags": 0,
"_parent": {
"__id__": 34
"__id__": 41
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 36
"__id__": 43
}
],
"_prefab": null,
......@@ -1672,7 +1769,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 35
"__id__": 42
},
"_enabled": true,
"_materials": [
......@@ -1699,12 +1796,200 @@
"_atlas": null,
"_id": "fdEmMC9VtKo4iqXHl1WQ1L"
},
{
"__type__": "cc.Node",
"_name": "img_door_right",
"_objFlags": 0,
"_parent": {
"__id__": 41
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 45
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 650,
"height": 791
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
280,
-12,
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": "99CqxE0lJBbpu1fLC4wPNS"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 44
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "cc04aa5b-a500-42a7-b7b5-44ea261d28f3"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "bfSbbqC9VLUJQRejmQd8kx"
},
{
"__type__": "cc.Node",
"_name": "img_door_left",
"_objFlags": 0,
"_parent": {
"__id__": 41
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 47
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 702,
"height": 788
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-263,
-11,
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": "d91vYMz2lIFZ97ZRvvgnkp"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 46
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "c62fba81-5257-46e2-aa59-611c9306fdb2"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "51H85F4ThOKI5c+21ScTDb"
},
{
"__type__": "cc.Mask",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 34
"__id__": 41
},
"_enabled": true,
"_materials": [
......@@ -1724,26 +2009,26 @@
"_name": "img_kuang",
"_objFlags": 0,
"_parent": {
"__id__": 33
"__id__": 40
},
"_children": [
{
"__id__": 39
"__id__": 50
},
{
"__id__": 41
"__id__": 52
},
{
"__id__": 43
"__id__": 54
},
{
"__id__": 45
"__id__": 56
}
],
"_active": true,
"_components": [
{
"__id__": 47
"__id__": 58
}
],
"_prefab": null,
......@@ -1799,13 +2084,13 @@
"_name": "img_dengdai",
"_objFlags": 0,
"_parent": {
"__id__": 38
"__id__": 49
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 40
"__id__": 51
}
],
"_prefab": null,
......@@ -1861,7 +2146,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 39
"__id__": 50
},
"_enabled": true,
"_materials": [
......@@ -1893,13 +2178,13 @@
"_name": "img_dengpao",
"_objFlags": 0,
"_parent": {
"__id__": 38
"__id__": 49
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 42
"__id__": 53
}
],
"_prefab": null,
......@@ -1955,7 +2240,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 41
"__id__": 52
},
"_enabled": true,
"_materials": [
......@@ -1987,13 +2272,13 @@
"_name": "img_right_3",
"_objFlags": 0,
"_parent": {
"__id__": 38
"__id__": 49
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 44
"__id__": 55
}
],
"_prefab": null,
......@@ -2049,7 +2334,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 43
"__id__": 54
},
"_enabled": true,
"_materials": [
......@@ -2081,13 +2366,13 @@
"_name": "img_left_3",
"_objFlags": 0,
"_parent": {
"__id__": 38
"__id__": 49
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 46
"__id__": 57
}
],
"_prefab": null,
......@@ -2143,7 +2428,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 45
"__id__": 56
},
"_enabled": true,
"_materials": [
......@@ -2175,7 +2460,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 38
"__id__": 49
},
"_enabled": true,
"_materials": [
......@@ -2329,7 +2614,7 @@
"_active": true,
"_components": [
{
"__id__": 51
"__id__": 62
}
],
"_prefab": null,
......@@ -2385,7 +2670,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 50
"__id__": 61
},
"_enabled": true,
"alignMode": 1,
......@@ -2418,7 +2703,7 @@
"_active": true,
"_components": [
{
"__id__": 53
"__id__": 64
}
],
"_prefab": null,
......@@ -2474,7 +2759,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 52
"__id__": 63
},
"_enabled": true,
"alignMode": 1,
......@@ -2505,10 +2790,10 @@
},
"_children": [
{
"__id__": 55
"__id__": 66
},
{
"__id__": 58
"__id__": 69
}
],
"_active": false,
......@@ -2566,11 +2851,11 @@
"_name": "bg",
"_objFlags": 0,
"_parent": {
"__id__": 54
"__id__": 65
},
"_children": [
{
"__id__": 56
"__id__": 67
}
],
"_active": true,
......@@ -2628,13 +2913,13 @@
"_name": "img_ battery001",
"_objFlags": 0,
"_parent": {
"__id__": 55
"__id__": 66
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 57
"__id__": 68
}
],
"_prefab": null,
......@@ -2690,7 +2975,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 56
"__id__": 67
},
"_enabled": true,
"_materials": [
......@@ -2722,17 +3007,17 @@
"_name": "item_img",
"_objFlags": 0,
"_parent": {
"__id__": 54
"__id__": 65
},
"_children": [
{
"__id__": 59
"__id__": 70
}
],
"_active": true,
"_components": [
{
"__id__": 61
"__id__": 72
}
],
"_prefab": null,
......@@ -2788,13 +3073,13 @@
"_name": "img",
"_objFlags": 0,
"_parent": {
"__id__": 58
"__id__": 69
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 60
"__id__": 71
}
],
"_prefab": null,
......@@ -2850,7 +3135,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 59
"__id__": 70
},
"_enabled": true,
"_materials": [
......@@ -2882,7 +3167,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 58
"__id__": 69
},
"_enabled": true,
"_normalMaterial": null,
......@@ -2954,10 +3239,10 @@
},
"_children": [
{
"__id__": 63
"__id__": 74
},
{
"__id__": 76
"__id__": 87
}
],
"_active": false,
......@@ -3015,26 +3300,26 @@
"_name": "bg",
"_objFlags": 0,
"_parent": {
"__id__": 62
"__id__": 73
},
"_children": [
{
"__id__": 64
"__id__": 75
},
{
"__id__": 66
"__id__": 77
},
{
"__id__": 68
"__id__": 79
},
{
"__id__": 70
"__id__": 81
},
{
"__id__": 72
"__id__": 83
},
{
"__id__": 74
"__id__": 85
}
],
"_active": true,
......@@ -3092,13 +3377,13 @@
"_name": "img_battery6",
"_objFlags": 0,
"_parent": {
"__id__": 63
"__id__": 74
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 65
"__id__": 76
}
],
"_prefab": null,
......@@ -3154,7 +3439,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 64
"__id__": 75
},
"_enabled": true,
"_materials": [
......@@ -3186,13 +3471,13 @@
"_name": "img_battery4",
"_objFlags": 0,
"_parent": {
"__id__": 63
"__id__": 74
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 67
"__id__": 78
}
],
"_prefab": null,
......@@ -3248,7 +3533,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 66
"__id__": 77
},
"_enabled": true,
"_materials": [
......@@ -3280,13 +3565,13 @@
"_name": "img_battery5",
"_objFlags": 0,
"_parent": {
"__id__": 63
"__id__": 74
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 69
"__id__": 80
}
],
"_prefab": null,
......@@ -3342,7 +3627,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 68
"__id__": 79
},
"_enabled": true,
"_materials": [
......@@ -3374,13 +3659,13 @@
"_name": "img_battery3",
"_objFlags": 0,
"_parent": {
"__id__": 63
"__id__": 74
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 71
"__id__": 82
}
],
"_prefab": null,
......@@ -3436,7 +3721,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 70
"__id__": 81
},
"_enabled": true,
"_materials": [
......@@ -3468,13 +3753,13 @@
"_name": "img_battery2",
"_objFlags": 0,
"_parent": {
"__id__": 63
"__id__": 74
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 73
"__id__": 84
}
],
"_prefab": null,
......@@ -3530,7 +3815,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 72
"__id__": 83
},
"_enabled": true,
"_materials": [
......@@ -3562,13 +3847,13 @@
"_name": "img_battery1",
"_objFlags": 0,
"_parent": {
"__id__": 63
"__id__": 74
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 75
"__id__": 86
}
],
"_prefab": null,
......@@ -3624,7 +3909,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 74
"__id__": 85
},
"_enabled": true,
"_materials": [
......@@ -3656,17 +3941,17 @@
"_name": "item_text",
"_objFlags": 0,
"_parent": {
"__id__": 62
"__id__": 73
},
"_children": [
{
"__id__": 77
"__id__": 88
}
],
"_active": true,
"_components": [
{
"__id__": 79
"__id__": 90
}
],
"_prefab": null,
......@@ -3722,13 +4007,13 @@
"_name": "text",
"_objFlags": 0,
"_parent": {
"__id__": 76
"__id__": 87
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 78
"__id__": 89
}
],
"_prefab": null,
......@@ -3784,7 +4069,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 77
"__id__": 88
},
"_enabled": true,
"_materials": [
......@@ -3817,7 +4102,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 76
"__id__": 87
},
"_enabled": true,
"_normalMaterial": null,
......@@ -3889,14 +4174,18 @@
},
"_children": [
{
"__id__": 81
"__id__": 92
},
{
"__id__": 83
"__id__": 94
}
],
"_active": false,
"_components": [],
"_components": [
{
"__id__": 96
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
......@@ -3947,16 +4236,16 @@
},
{
"__type__": "cc.Node",
"_name": "img_left_1",
"_name": "img_1",
"_objFlags": 0,
"_parent": {
"__id__": 80
"__id__": 91
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 82
"__id__": 93
}
],
"_prefab": null,
......@@ -4012,7 +4301,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 81
"__id__": 92
},
"_enabled": true,
"_materials": [
......@@ -4041,16 +4330,16 @@
},
{
"__type__": "cc.Node",
"_name": "img_left_2",
"_name": "img_2",
"_objFlags": 0,
"_parent": {
"__id__": 80
"__id__": 91
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 84
"__id__": 95
}
],
"_prefab": null,
......@@ -4106,7 +4395,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 83
"__id__": 94
},
"_enabled": true,
"_materials": [
......@@ -4133,6 +4422,16 @@
"_atlas": null,
"_id": "b4o+3fqrRCdL/wyN27y+Hl"
},
{
"__type__": "f060dME6o9NpZ1srnh7CwCN",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 91
},
"_enabled": true,
"_id": "22vw/sJf1FcqZqummVQC8S"
},
{
"__type__": "cc.Node",
"_name": "img_right",
......@@ -4142,14 +4441,18 @@
},
"_children": [
{
"__id__": 86
"__id__": 98
},
{
"__id__": 88
"__id__": 100
}
],
"_active": false,
"_components": [],
"_components": [
{
"__id__": 102
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
......@@ -4200,16 +4503,16 @@
},
{
"__type__": "cc.Node",
"_name": "img_right_1",
"_name": "img_1",
"_objFlags": 0,
"_parent": {
"__id__": 85
"__id__": 97
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 87
"__id__": 99
}
],
"_prefab": null,
......@@ -4265,7 +4568,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 86
"__id__": 98
},
"_enabled": true,
"_materials": [
......@@ -4294,16 +4597,16 @@
},
{
"__type__": "cc.Node",
"_name": "img_right_2",
"_name": "img_2",
"_objFlags": 0,
"_parent": {
"__id__": 85
"__id__": 97
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 89
"__id__": 101
}
],
"_prefab": null,
......@@ -4359,7 +4662,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 88
"__id__": 100
},
"_enabled": true,
"_materials": [
......@@ -4386,6 +4689,16 @@
"_atlas": null,
"_id": "d5U7sB2ilMzYwPx3wiQzsl"
},
{
"__type__": "f060dME6o9NpZ1srnh7CwCN",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 97
},
"_enabled": true,
"_id": "99+apunKpKbK8WdfjFGb2F"
},
{
"__type__": "cc.Node",
"_name": "layout_xiaodi",
......@@ -4395,16 +4708,16 @@
},
"_children": [
{
"__id__": 91
"__id__": 104
},
{
"__id__": 93
"__id__": 106
}
],
"_active": true,
"_components": [
{
"__id__": 97
"__id__": 110
}
],
"_prefab": null,
......@@ -4460,13 +4773,13 @@
"_name": "ani",
"_objFlags": 0,
"_parent": {
"__id__": 90
"__id__": 103
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 92
"__id__": 105
}
],
"_prefab": null,
......@@ -4522,7 +4835,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 91
"__id__": 104
},
"_enabled": true,
"_materials": [
......@@ -4562,17 +4875,17 @@
"_name": "btn_go",
"_objFlags": 0,
"_parent": {
"__id__": 90
"__id__": 103
},
"_children": [
{
"__id__": 94
"__id__": 107
}
],
"_active": false,
"_components": [
{
"__id__": 96
"__id__": 109
}
],
"_prefab": null,
......@@ -4628,13 +4941,13 @@
"_name": "text",
"_objFlags": 0,
"_parent": {
"__id__": 93
"__id__": 106
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 95
"__id__": 108
}
],
"_prefab": null,
......@@ -4690,7 +5003,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 94
"__id__": 107
},
"_enabled": true,
"_materials": [
......@@ -4723,7 +5036,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 93
"__id__": 106
},
"_enabled": true,
"_materials": [
......@@ -4755,11 +5068,11 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 90
"__id__": 103
},
"_enabled": true,
"aniRole": {
"__id__": 91
"__id__": 104
},
"moveX": 500,
"_id": "e4RrOXSNJGd68Mq3UTYY0p"
......@@ -4773,13 +5086,13 @@
},
"_children": [
{
"__id__": 99
"__id__": 112
},
{
"__id__": 102
"__id__": 115
},
{
"__id__": 103
"__id__": 116
}
],
"_active": true,
......@@ -4837,11 +5150,11 @@
"_name": "font",
"_objFlags": 0,
"_parent": {
"__id__": 98
"__id__": 111
},
"_children": [
{
"__id__": 100
"__id__": 113
}
],
"_active": true,
......@@ -4899,13 +5212,13 @@
"_name": "BRLNSDB",
"_objFlags": 0,
"_parent": {
"__id__": 99
"__id__": 112
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 101
"__id__": 114
}
],
"_prefab": null,
......@@ -4961,7 +5274,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 100
"__id__": 113
},
"_enabled": true,
"_materials": [
......@@ -4996,7 +5309,7 @@
"_name": "img",
"_objFlags": 0,
"_parent": {
"__id__": 98
"__id__": 111
},
"_children": [],
"_active": true,
......@@ -5054,23 +5367,26 @@
"_name": "audio",
"_objFlags": 0,
"_parent": {
"__id__": 98
"__id__": 111
},
"_children": [
{
"__id__": 104
"__id__": 117
},
{
"__id__": 106
"__id__": 119
},
{
"__id__": 108
"__id__": 121
},
{
"__id__": 110
"__id__": 123
},
{
"__id__": 112
"__id__": 125
},
{
"__id__": 127
}
],
"_active": true,
......@@ -5128,13 +5444,13 @@
"_name": "btn",
"_objFlags": 0,
"_parent": {
"__id__": 103
"__id__": 116
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 105
"__id__": 118
}
],
"_prefab": null,
......@@ -5190,7 +5506,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 104
"__id__": 117
},
"_enabled": true,
"_clip": {
......@@ -5206,16 +5522,16 @@
},
{
"__type__": "cc.Node",
"_name": "dragdown",
"_name": "right",
"_objFlags": 0,
"_parent": {
"__id__": 103
"__id__": 116
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 107
"__id__": 120
}
],
"_prefab": null,
......@@ -5264,37 +5580,39 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "aaSrAEh8dNIaDu0wikJCMm"
"_id": "84wzmfW3hEGIUoQyNhREoF"
},
{
"__type__": "cc.AudioSource",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 106
"__id__": 119
},
"_enabled": true,
"_clip": null,
"_clip": {
"__uuid__": "7f3f5b5c-1d1b-4f98-a7fd-b733ea11c96e"
},
"_volume": 1,
"_mute": false,
"_loop": false,
"_firstlyEnabled": true,
"playOnLoad": false,
"preload": false,
"_id": "b0JfX7EsRLt4HEO2KUSlBN"
"_id": "70AJyNUJhBNLWYawFkR5Ah"
},
{
"__type__": "cc.Node",
"_name": "nextgame",
"_name": "bettery",
"_objFlags": 0,
"_parent": {
"__id__": 103
"__id__": 116
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 109
"__id__": 122
}
],
"_prefab": null,
......@@ -5343,37 +5661,39 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "68Q4sfDYJNtog4jHK/Jj79"
"_id": "33CfaeQwVBTKotRt5nm8gs"
},
{
"__type__": "cc.AudioSource",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 108
"__id__": 121
},
"_enabled": true,
"_clip": null,
"_clip": {
"__uuid__": "d9005b3f-48e6-4f3f-89d4-0d554e5badc2"
},
"_volume": 1,
"_mute": false,
"_loop": false,
"_firstlyEnabled": true,
"playOnLoad": false,
"preload": false,
"_id": "55mCkrNNdDKLZhQPjTWvk5"
"_id": "0cwA23vn5GOqQG0vO5qn+f"
},
{
"__type__": "cc.Node",
"_name": "boom",
"_name": "error",
"_objFlags": 0,
"_parent": {
"__id__": 103
"__id__": 116
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 111
"__id__": 124
}
],
"_prefab": null,
......@@ -5422,37 +5742,39 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "59KURkYYNGa7XRwYEk4WO8"
"_id": "caGlvgLrlBzqn6xFXh5cBt"
},
{
"__type__": "cc.AudioSource",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 110
"__id__": 123
},
"_enabled": true,
"_clip": null,
"_clip": {
"__uuid__": "264c5afb-d4da-4369-9909-bf9608b19ee7"
},
"_volume": 1,
"_mute": false,
"_loop": false,
"_firstlyEnabled": true,
"playOnLoad": false,
"preload": false,
"_id": "f1NLOZpHdA1YKZANPrh7Cr"
"_id": "e04rA7AS9Ad7lbttleWBza"
},
{
"__type__": "cc.Node",
"_name": "pie_drop",
"_name": "bgm",
"_objFlags": 0,
"_parent": {
"__id__": 103
"__id__": 116
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 113
"__id__": 126
}
],
"_prefab": null,
......@@ -5501,24 +5823,107 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "14A8mKEgxJ8q/rhrJan2Uk"
"_id": "a0AsrWhRNOPIQCtHYmL3Q5"
},
{
"__type__": "cc.AudioSource",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 112
"__id__": 125
},
"_enabled": true,
"_clip": {
"__uuid__": "69587344-7bb2-4de2-bb77-6332cf7c8a85"
},
"_volume": 1,
"_mute": false,
"_loop": false,
"_firstlyEnabled": true,
"playOnLoad": false,
"preload": false,
"_id": "aaTdrobAFC9pVk/GWt9+Ln"
},
{
"__type__": "cc.Node",
"_name": "opendoor",
"_objFlags": 0,
"_parent": {
"__id__": 116
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 128
}
],
"_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": "d3sI/5hkhIar9jjK1aRcaK"
},
{
"__type__": "cc.AudioSource",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 127
},
"_enabled": true,
"_clip": null,
"_clip": {
"__uuid__": "45d19155-b425-40f9-8f22-28081fe78a5f"
},
"_volume": 1,
"_mute": false,
"_loop": false,
"_firstlyEnabled": true,
"playOnLoad": false,
"preload": false,
"_id": "95X9g64cVO5JB131ZnufbM"
"_id": "d5pRdeDB5L2KuL3dkcx4n5"
},
{
"__type__": "cc.Canvas",
......@@ -5573,25 +5978,31 @@
},
"_enabled": true,
"layout_canvas": {
"__id__": 34
"__id__": 41
},
"layout_items": {
"__id__": 49
"__id__": 60
},
"layout_target": {
"__id__": 48
"__id__": 59
},
"layout_battery_left": {
"__id__": 50
"__id__": 61
},
"layout_battery_right": {
"__id__": 52
"__id__": 63
},
"item_battery_text": {
"__id__": 62
"__id__": 73
},
"item_battery_img": {
"__id__": 54
"__id__": 65
},
"img_left": {
"__id__": 91
},
"img_right": {
"__id__": 97
},
"_id": "5b78aJTZFGI79ubV+y7E/s"
}
......
......@@ -74,10 +74,24 @@ export default class SceneComponent extends MyCocosSceneComponent {
@property(cc.Node) layout_battery_right: cc.Node = null;
@property(cc.Node) item_battery_text: cc.Node = null;
@property(cc.Node) item_battery_img: cc.Node = null;
@property(cc.Node) img_left: cc.Node = null;
@property(cc.Node) img_right: cc.Node = null;
initCanvas() {
let img = pg.view.find(this.layout_canvas, 'img');
pg.view.setNetImg(img, this.currentQuestion.bgItem.url, { w: 1220, h: 790 }, false)
if (this.current == 0) {
this.playLocalAudio('opendoor')
let img_door_left = pg.view.find(this.layout_canvas, 'img_door_left')
let img_door_right = pg.view.find(this.layout_canvas, 'img_door_right')
this.img_left.active = true;
this.img_right.active = true;
cc.tween(img_door_left).to(1.6, { x: -1000 }).call(() => {
this.img_left.active = false;
this.img_right.active = false;
}).start();
cc.tween(img_door_right).to(1.6, { x: 1000 }).start();
}
this.initTargets();
}
initTargets() {
......@@ -107,6 +121,15 @@ export default class SceneComponent extends MyCocosSceneComponent {
let hotZoneItemArr = this.currentQuestion.hotZoneItemArr
let lineNum = Math.ceil(hotZoneItemArr.length / 2)
let lastY = null;
let delayTime = 1.5;
if (this.current == 0) {
this.scheduleOnce(() => {
this.playLocalAudio('bettery')
}, delayTime)
} else {
this.playLocalAudio('bettery')
}
hotZoneItemArr.forEach((data, i) => {
let isleft = i + 1 <= lineNum
let layout = isleft ? this.layout_battery_left : this.layout_battery_right;
......@@ -129,14 +152,23 @@ export default class SceneComponent extends MyCocosSceneComponent {
let sid = (i + 1) % 4 + 1
pg.view.visible(pg.view.find(item, 'bg/img_battery' + sid), true)
item.x = -400;
cc.tween(item).to(0.5, { x: 0 }).start();
if (this.current == 0) {
cc.tween(item).delay(delayTime).to(0.5, { x: 0 }).start();
} else {
cc.tween(item).to(0.5, { x: 0 }).start();
}
} else {
// 右侧
let sid = (i + 1 - lineNum) % 2 + 5
pg.view.visible(pg.view.find(item, 'bg/img_battery' + sid), true)
item_text.x = 20
item.x = 400;
cc.tween(item).to(0.5, { x: 0 }).start();
if (this.current == 0) {
cc.tween(item).delay(delayTime).to(0.5, { x: 0 }).start();
} else {
cc.tween(item).to(0.5, { x: 0 }).start();
}
}
if (!lastY && lastY != 0) lastY = orgPosY;
item.y = lastY -= spaceTextY;
......@@ -161,11 +193,19 @@ export default class SceneComponent extends MyCocosSceneComponent {
if (isleft) {
// 左侧
item.x = -400;
cc.tween(item).to(0.5, { x: 0 }).start();
if (this.current == 0) {
cc.tween(item).delay(delayTime).to(0.5, { x: 0 }).start();
} else {
cc.tween(item).to(0.5, { x: 0 }).start();
}
} else {
// 右侧
item.x = 400;
cc.tween(item).to(0.5, { x: 0 }).start();
if (this.current == 0) {
cc.tween(item).delay(delayTime).to(0.5, { x: 0 }).start();
} else {
cc.tween(item).to(0.5, { x: 0 }).start();
}
}
layout.addChild(item);
......
{
"ver": "2.3.5",
"uuid": "65a5d744-0ad4-4cd8-a26c-ec6dc6d348ef",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 703,
"height": 791,
"platformSettings": {},
"subMetas": {
"img_door_left": {
"ver": "1.0.4",
"uuid": "c62fba81-5257-46e2-aa59-611c9306fdb2",
"rawTextureUuid": "65a5d744-0ad4-4cd8-a26c-ec6dc6d348ef",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0.5,
"offsetY": -1.5,
"trimX": 1,
"trimY": 3,
"width": 702,
"height": 788,
"rawWidth": 703,
"rawHeight": 791,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "4a1cd86e-c267-47ab-a5c9-5c9e20ca1fe4",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 651,
"height": 791,
"platformSettings": {},
"subMetas": {
"img_door_right": {
"ver": "1.0.4",
"uuid": "cc04aa5b-a500-42a7-b7b5-44ea261d28f3",
"rawTextureUuid": "4a1cd86e-c267-47ab-a5c9-5c9e20ca1fe4",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0.5,
"offsetY": 0,
"trimX": 1,
"trimY": 0,
"width": 650,
"height": 791,
"rawWidth": 651,
"rawHeight": 791,
"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