Commit 847d8c27 authored by Tt's avatar Tt

背景层与逻辑脱离

parent f99454e0
......@@ -3157,6 +3157,15 @@
"_children": [
{
"__id__": 72
},
{
"__id__": 74
},
{
"__id__": 76
},
{
"__id__": 85
}
],
"_active": true,
......@@ -3216,21 +3225,11 @@
"_parent": {
"__id__": 71
},
"_children": [
{
"__id__": 73
},
{
"__id__": 75
},
{
"__id__": 84
}
],
"_children": [],
"_active": true,
"_components": [
{
"__id__": 85
"__id__": 73
}
],
"_prefab": null,
......@@ -3281,18 +3280,50 @@
"groupIndex": 0,
"_id": "5cc+EQP4dF26MCXn2YvaA+"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 72
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "451dd74e-2fb6-4165-ac42-80ad212cb1bb"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "f9r5kn9chBxLfc3QabqYuH"
},
{
"__type__": "cc.Node",
"_name": "bottom_megaphone",
"_objFlags": 0,
"_parent": {
"__id__": 72
"__id__": 71
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 74
"__id__": 75
}
],
"_prefab": null,
......@@ -3348,7 +3379,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 73
"__id__": 74
},
"_enabled": true,
"_materials": [
......@@ -3380,20 +3411,20 @@
"_name": "paopao",
"_objFlags": 0,
"_parent": {
"__id__": 72
"__id__": 71
},
"_children": [
{
"__id__": 76
"__id__": 77
},
{
"__id__": 78
"__id__": 79
},
{
"__id__": 80
"__id__": 81
},
{
"__id__": 82
"__id__": 83
}
],
"_active": false,
......@@ -3451,13 +3482,13 @@
"_name": "bubble",
"_objFlags": 0,
"_parent": {
"__id__": 75
"__id__": 76
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 77
"__id__": 78
}
],
"_prefab": null,
......@@ -3513,7 +3544,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 76
"__id__": 77
},
"_enabled": true,
"_materials": [
......@@ -3545,13 +3576,13 @@
"_name": "bubble_broken",
"_objFlags": 0,
"_parent": {
"__id__": 75
"__id__": 76
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 79
"__id__": 80
}
],
"_prefab": null,
......@@ -3607,7 +3638,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 78
"__id__": 79
},
"_enabled": true,
"_materials": [
......@@ -3639,13 +3670,13 @@
"_name": "img",
"_objFlags": 0,
"_parent": {
"__id__": 75
"__id__": 76
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 81
"__id__": 82
}
],
"_prefab": null,
......@@ -3701,7 +3732,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 80
"__id__": 81
},
"_enabled": true,
"_materials": [
......@@ -3733,13 +3764,13 @@
"_name": "text",
"_objFlags": 0,
"_parent": {
"__id__": 75
"__id__": 76
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 83
"__id__": 84
}
],
"_prefab": null,
......@@ -3795,7 +3826,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 82
"__id__": 83
},
"_enabled": true,
"_materials": [
......@@ -3828,7 +3859,7 @@
"_name": "layer_paopao",
"_objFlags": 0,
"_parent": {
"__id__": 72
"__id__": 71
},
"_children": [],
"_active": true,
......@@ -3881,38 +3912,6 @@
"groupIndex": 0,
"_id": "3a7B5x5OFIoJP3NgMLbjJp"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 72
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "451dd74e-2fb6-4165-ac42-80ad212cb1bb"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "f9r5kn9chBxLfc3QabqYuH"
},
{
"__type__": "cc.Node",
"_name": "layer_back",
......
......@@ -37,7 +37,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
initView() { }
initEvent() {
let bottom_megaphone = pg.view.find(this, 'layer_game/bg/bottom_megaphone')
let bottom_megaphone = pg.view.find(this, 'layer_game/bottom_megaphone')
// 底部海螺点击事件
pg.view.touchOn(bottom_megaphone, this.create_bubbles, this)
}
......@@ -50,7 +50,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.speed = 30
console.log(this.data)
// 底部海螺
let bottom_megaphone = pg.view.find(this, 'layer_game/bg/bottom_megaphone')
let bottom_megaphone = pg.view.find(this, 'layer_game/bottom_megaphone')
// 开始海螺从底部升起
let btn = cc.tween(bottom_megaphone)
btn.to(1.5, { y: -438 })
......@@ -72,9 +72,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
if (this.touchNumber > this.currentQuestion.options.length) {
console.log('此题结束')
} else {
let bottom_megaphone = pg.view.find(this, 'layer_game/bg/bottom_megaphone')
let layer_paopao = pg.view.find(this, 'layer_game/bg/layer_paopao')
let paoaoParent = pg.view.find(this, 'layer_game/bg/paopao')
let bottom_megaphone = pg.view.find(this, 'layer_game/bottom_megaphone')
let layer_paopao = pg.view.find(this, 'layer_game/layer_paopao')
let paoaoParent = pg.view.find(this, 'layer_game/paopao')
let newPaoPao = cc.instantiate(paoaoParent)
// 点击泡泡
pg.view.touchOn(newPaoPao, this.touchPaoPao, this)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment