Commit 4d671167 authored by WangFan's avatar WangFan

修复部分显示效果

parent 0fa4f01c
......@@ -19,16 +19,19 @@
"_children": [
{
"__id__": 2
},
{
"__id__": 33
}
],
"_active": true,
"_components": [
{
"__id__": 33
"__id__": 38
}
],
"_prefab": {
"__id__": 34
"__id__": 39
},
"_opacity": 255,
"_color": {
......@@ -107,7 +110,7 @@
"__id__": 20
}
],
"_active": true,
"_active": false,
"_components": [],
"_prefab": {
"__id__": 32
......@@ -1226,6 +1229,175 @@
"fileId": "7cG7U7lH9Ie5/sK83LZUCP",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "res",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 34
}
],
"_active": true,
"_components": [],
"_prefab": {
"__id__": 37
},
"_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": ""
},
{
"__type__": "cc.Node",
"_name": "ending",
"_objFlags": 0,
"_parent": {
"__id__": 33
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 35
}
],
"_prefab": {
"__id__": 36
},
"_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": ""
},
{
"__type__": "cc.AudioSource",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 34
},
"_enabled": true,
"_clip": {
"__uuid__": "78fa786c-cb39-47d2-a4a8-c6325aa156bb"
},
"_volume": 1,
"_mute": false,
"_loop": false,
"_firstlyEnabled": true,
"playOnLoad": false,
"preload": false,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "8944c192-3675-466f-9f94-8f824c68e822"
},
"fileId": "f9vxaSJK5EpYuRQDkXL09t",
"sync": false
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "8944c192-3675-466f-9f94-8f824c68e822"
},
"fileId": "4cGmarm1NKC6LGDcWWF/bS",
"sync": false
},
{
"__type__": "8aa900+eYBD775dNwfvQqgE",
"_name": "",
......
......@@ -14,8 +14,10 @@ export default class LayerEnding extends cc.Component {
private layer_center: cc.Node;
private replay_btn: cc.Node;
private next_btn: cc.Node;
private res:cc.Node;
onLoad() {
this.layer_center = pg.view.find(this.node, "layer_center")
this.res= pg.view.find(this.node,"res")
pg.view.visible(this.layer_center, false);
this.replay_btn = pg.view.find(this.layer_center, "replay_btn")
this.next_btn = pg.view.find(this.layer_center, "next_btn")
......@@ -26,9 +28,10 @@ export default class LayerEnding extends cc.Component {
})
}
showLayer(data) {
let ending = pg.view.find(this.res,"ending")
pg.audio.playLocalAudio(ending)
pg.view.visible(this.layer_center, true)
pg.view.setString(pg.view.find(this.layer_center, 'finish_box/coin_num'), 'X' + data.coin);
let finish_cat = pg.view.find(this.layer_center, "finish_cat")
pg.view.playDBAnimation(finish_cat, "finish", 1);
let bg_light = pg.view.find(this.layer_center, "bg_light")
......
{
"ver": "1.1.2",
"uuid": "d05ee77e-7d87-4d5a-b953-c0d649f3ed2e",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "78fa786c-cb39-47d2-a4a8-c6325aa156bb",
"downloadMode": 0,
"duration": 4.04898,
"subMetas": {}
}
\ No newline at end of file
This diff is collapsed.
......@@ -132,12 +132,18 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
onTouchReplay() {
this.playBtnAudio()
this.initGame()
}
onTouchNext() {
this.playBtnAudio()
this.initGame()
}
playBtnAudio(){
let btn_audio = pg.view.find(this.res,"audio/btn")
pg.audio.playLocalAudio(btn_audio)
}
//--------------------------------Record-----------------------------
private letter: string;
......
......@@ -2,6 +2,8 @@ export const defaultData =
{
"recordFlag": false, "title": "", "questionText": "", "questionTextAudio": "", "questions": [
{ "text": "apple", "time": 2 },
{ "text": "pear", "time": 2 },
{ "text": "pencil", "time": 2 },
{ "text": "While there is life there is hope", "time": 2 }], "bgAudio": "", "bgAudioName": "", "audioName": ""
}
// {
......
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