Commit 2c783666 authored by yu's avatar yu

1

parent 0d99bf99
{
"ver": "1.1.2",
"uuid": "19a64a93-34ed-4e65-9303-d0a268c1803c",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.0",
"uuid": "927f6c73-f3af-4c69-a990-9dc6668dbb70",
"subMetas": {}
}
\ No newline at end of file
// pg.event.emit('npc_layer_back_init',{ })
// pg.event.emit('npc_voice_play_voice_start')
// pg.event.emit('npc_voice_play_voice_end')
import pg from "../../scene/pg_hy14_pipei";
const { ccclass, property } = cc._decorator;
@ccclass
......@@ -14,25 +16,50 @@ export default class LayerBack extends cc.Component {
this.initView();
this.initEvent();
}
private label_title: cc.Node;
initView() {
this.btn_back = pg.view.find(this, 'btn_back')
this.img_npc_voice = pg.view.find(this, 'img_npc_voice')
this.label_title = pg.view.find(this, 'label_title')
this.img_npc_voice = pg.view.find(this.label_title, 'img_npc_voice')
pg.view.touchOn(this.img_npc_voice, this.playVoiceStart, this);
}
private npcTitle: string;
private npcAudio: string;
updateView(data) {
this.npcTitle = data.npcTitle
this.npcAudio = data.npcAudio
pg.view.visible(this.img_npc_voice, this.npcAudio)
pg.view.visible(this.label_title, this.npcTitle)
pg.view.setString(this.label_title, this.npcTitle);
}
initEvent() {
pg.view.touchOn(this.btn_back, this.onTouchBack, this)
pg.event.on('npc_voice_play_voice_start', () => {
this.playVoiceStart();
})
pg.event.on('npc_voice_play_voice_end', () => {
this.playVoiceEnd();
pg.event.on('npc_layer_back_init', (data) => {
this.updateView(data);
if (!this.npcAudio) {
pg.event.emit('npc_voice_play_voice_end');
} else {
this.playVoiceStart();
}
})
}
private playVoiceCount: number;
private audioId: number;
playVoiceStart() {
if (this.playVoiceCount > 0) return;
if (this.playVoiceCount > 0) {
if (this.audioId) cc.audioEngine.stopEffect(this.audioId);
this.playVoiceEnd();
}
this.playVoiceCount = 0;
this.schedule(this.playVoiceRunning, 0.3)
pg.audio.playAudioByUrl(this.npcAudio, () => {
this.playVoiceEnd();
pg.event.emit('npc_voice_play_voice_end')
}, (audioId) => {
this.audioId = audioId;
});
}
playVoiceRunning() {
this.playVoiceCount++;
......@@ -54,7 +81,9 @@ export default class LayerBack extends cc.Component {
p3.active = false;
}
onTouchBack() {
alert('back')
const middleLayer = cc.find('middleLayer');
const middleLayerComponent = middleLayer.getComponent('middleLayer');
middleLayerComponent.exitGame();
}
}
......@@ -62,4 +91,3 @@ export default class LayerBack extends cc.Component {
......@@ -27,14 +27,14 @@
"_active": true,
"_components": [
{
"__id__": 19
"__id__": 22
},
{
"__id__": 20
"__id__": 23
}
],
"_prefab": {
"__id__": 21
"__id__": 24
},
"_opacity": 255,
"_color": {
......@@ -58,8 +58,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
960,
540,
0,
0,
0,
......@@ -286,14 +286,14 @@
"__id__": 1
},
"asset": {
"__id__": 0
"__uuid__": "0b87ca13-07e1-4237-ab3b-7f27c69deb2d"
},
"fileId": "61ulP3c3dDLb+4SfgnWK1F",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "img_npc_voice",
"_name": "label_title",
"_objFlags": 0,
"_parent": {
"__id__": 1
......@@ -301,22 +301,90 @@
"_children": [
{
"__id__": 8
}
],
"_active": true,
"_components": [
{
"__id__": 20
}
],
"_prefab": {
"__id__": 21
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 188,
"g": 132,
"b": 235,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 150.74,
"height": 63
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-685.473,
441.1,
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": "img_npc_voice",
"_objFlags": 0,
"_parent": {
"__id__": 7
},
"_children": [
{
"__id__": 9
},
{
"__id__": 11
"__id__": 12
},
{
"__id__": 14
"__id__": 15
}
],
"_active": true,
"_components": [
{
"__id__": 17
"__id__": 18
}
],
"_prefab": {
"__id__": 18
"__id__": 19
},
"_opacity": 255,
"_color": {
......@@ -328,8 +396,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
"width": 100,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -340,8 +408,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-638.532,
437.61,
208.95399999999995,
0,
0,
0,
0,
......@@ -370,17 +438,17 @@
"_name": "p1",
"_objFlags": 0,
"_parent": {
"__id__": 7
"__id__": 8
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 9
"__id__": 10
}
],
"_prefab": {
"__id__": 10
"__id__": 11
},
"_opacity": 255,
"_color": {
......@@ -434,7 +502,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
"__id__": 9
},
"_enabled": true,
"_materials": [
......@@ -467,9 +535,9 @@
"__id__": 1
},
"asset": {
"__id__": 0
"__uuid__": "0b87ca13-07e1-4237-ab3b-7f27c69deb2d"
},
"fileId": "eeSSmA+sZKe4zFitN7jaL3",
"fileId": "24sc3KKz1GwYD9fN1vST/m",
"sync": false
},
{
......@@ -477,17 +545,17 @@
"_name": "p2",
"_objFlags": 0,
"_parent": {
"__id__": 7
"__id__": 8
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 12
"__id__": 13
}
],
"_prefab": {
"__id__": 13
"__id__": 14
},
"_opacity": 255,
"_color": {
......@@ -541,7 +609,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 11
"__id__": 12
},
"_enabled": true,
"_materials": [
......@@ -574,9 +642,9 @@
"__id__": 1
},
"asset": {
"__id__": 0
"__uuid__": "0b87ca13-07e1-4237-ab3b-7f27c69deb2d"
},
"fileId": "29QTrf+y1JVa+D/t6K2NFr",
"fileId": "3eNvEzM/JP56UZzdtTQAIN",
"sync": false
},
{
......@@ -584,17 +652,17 @@
"_name": "p3",
"_objFlags": 0,
"_parent": {
"__id__": 7
"__id__": 8
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 15
"__id__": 16
}
],
"_prefab": {
"__id__": 16
"__id__": 17
},
"_opacity": 255,
"_color": {
......@@ -648,7 +716,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 14
"__id__": 15
},
"_enabled": true,
"_materials": [
......@@ -681,9 +749,9 @@
"__id__": 1
},
"asset": {
"__id__": 0
"__uuid__": "0b87ca13-07e1-4237-ab3b-7f27c69deb2d"
},
"fileId": "4anvaDTjZFOb9U0HkCAMR2",
"fileId": "72yribDepLjZha4CRHI/xf",
"sync": false
},
{
......@@ -691,15 +759,15 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
"__id__": 8
},
"_enabled": true,
"alignMode": 1,
"alignMode": 2,
"_target": null,
"_alignFlags": 9,
"_left": 321.46799999999996,
"_right": 0,
"_top": 102.38999999999999,
"_alignFlags": 32,
"_left": 0,
"_right": -108.21399999999997,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
......@@ -719,9 +787,55 @@
"__id__": 1
},
"asset": {
"__id__": 0
"__uuid__": "0b87ca13-07e1-4237-ab3b-7f27c69deb2d"
},
"fileId": "e4KS5h7tdFiJnCxI3YJ5LQ",
"sync": false
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "I Spell",
"_N$string": "I Spell",
"_fontSize": 50,
"_lineHeight": 50,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "927f6c73-f3af-4c69-a990-9dc6668dbb70"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "0b87ca13-07e1-4237-ab3b-7f27c69deb2d"
},
"fileId": "fft5aHS35DjoYobvKkISue",
"fileId": "0aBC7NPVlMNKQpHcVkCq5H",
"sync": false
},
{
......@@ -767,7 +881,7 @@
"__id__": 1
},
"asset": {
"__id__": 0
"__uuid__": "0b87ca13-07e1-4237-ab3b-7f27c69deb2d"
},
"fileId": "",
"sync": false
......
{
"ver": "1.1.2",
"uuid": "508c4cc0-7802-495f-8c13-85a2a81c52cd",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "5302f1d3-299b-4ec3-82d6-b6229fca203f",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "3d98b47f-f41e-4bf1-a130-a5edf51b794d",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "7d43789c-0138-4603-82af-1892d2cad30a",
"downloadMode": 0,
"duration": 1.085333,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "815cbe35-e740-4514-a84b-9fa42bd3957f",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"ver": "1.0.1",
"uuid": "4c8b7a1c-163d-4358-811b-1c79de3c9b9b",
"subMetas": {}
}
\ No newline at end of file
{
"name": "金币",
"SubTexture": [
{
"name": "金币动画/金币底",
"x": 1,
"height": 181,
"y": 181,
"width": 172
},
{
"name": "金币动画/条",
"x": 175,
"height": 18,
"y": 181,
"width": 9
},
{
"name": "金币动画/圈",
"x": 1,
"height": 178,
"y": 1,
"width": 218
},
{
"name": "金币动画/金币",
"x": 221,
"height": 185,
"y": 1,
"width": 178
}
],
"height": 512,
"imagePath": "coin1_tex_hy14_pipei.png",
"width": 512
}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "d0a6e7e0-94c8-4828-bd3e-ab5d98f0a611",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "570fd30f-4838-4f67-816d-5c827db29a50",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 512,
"height": 512,
"platformSettings": {},
"subMetas": {
"coin1_tex_hy14_pipei": {
"ver": "1.0.4",
"uuid": "6a3fb1c1-925f-471e-89e2-d797a62edd31",
"rawTextureUuid": "570fd30f-4838-4f67-816d-5c827db29a50",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -56,
"offsetY": 74.5,
"trimX": 1,
"trimY": 1,
"width": 398,
"height": 361,
"rawWidth": 512,
"rawHeight": 512,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "40224cac-9b7c-433a-a36a-ccead9ba6688",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "f011f737-1f65-490f-b1ca-1a960c98d8f9",
"subMetas": {}
}
\ No newline at end of file
{
"name": "金币2",
"SubTexture": [
{
"name": "金币动画/金币底",
"x": 1,
"height": 181,
"y": 181,
"width": 172
},
{
"name": "金币动画/条",
"x": 175,
"height": 18,
"y": 181,
"width": 9
},
{
"name": "金币动画/圈",
"x": 1,
"height": 178,
"y": 1,
"width": 218
},
{
"name": "金币动画/金币",
"x": 221,
"height": 185,
"y": 1,
"width": 178
}
],
"height": 512,
"imagePath": "coin2_tex_hy14_pipei.png",
"width": 512
}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "bcb9481d-5c54-4e50-85ad-777961ce63b2",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "9d1174da-be3b-490b-bbcd-0c43439093da",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 512,
"height": 512,
"platformSettings": {},
"subMetas": {
"coin2_tex_hy14_pipei": {
"ver": "1.0.4",
"uuid": "4a536775-acd5-494c-83fa-3a0d5c924980",
"rawTextureUuid": "9d1174da-be3b-490b-bbcd-0c43439093da",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -56,
"offsetY": 74.5,
"trimX": 1,
"trimY": 1,
"width": 398,
"height": 361,
"rawWidth": 512,
"rawHeight": 512,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "1.2.9",
"uuid": "a9b135f6-de46-4257-8be2-55dc863ce747",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}
\ No newline at end of file
// pg.event.emit('layer_coin_show_coin',1) //1 2 3硬币数量
// pg.event.once('layer_coin_show_coin_end',()=>{}) // 动画回调
import pg from "../../scene/pg_hy14_pipei";
const { ccclass, property } = cc._decorator;
@ccclass
export default class LayerCoin extends cc.Component {
private layout_center;
onLoad() {
pg.event.on('layer_coin_show_coin', (num) => { this.showCoin(num) });
this.layout_center = pg.view.find(this, 'layout_center')
}
showCoin(num) {
pg.view.visible(this.layout_center, true)
let coinAni = null;
pg.view.visible(pg.view.find(this.layout_center, "aniNode1"), false)
pg.view.visible(pg.view.find(this.layout_center, "aniNode2"), false)
pg.view.visible(pg.view.find(this.layout_center, "aniNode3"), false)
switch (num) {
case 1:
coinAni = pg.view.find(this.layout_center, "aniNode1");
coinAni.active = true;
pg.view.addEventDBAnimation(coinAni, this.hideCoin, this);
pg.view.playDBAnimation(coinAni, "one", 1);
this.playLocalAudio('coin');
break;
case 2:
coinAni = pg.view.find(this.layout_center, "aniNode2");
coinAni.active = true;
pg.view.addEventDBAnimation(coinAni, this.hideCoin, this);
pg.view.playDBAnimation(coinAni, "two", 1);
this.playLocalAudio('coin');
this.scheduleOnce(() => {
this.playLocalAudio('coin');
}, 0.3)
break;
case 3:
coinAni = pg.view.find(this.layout_center, "aniNode3");
coinAni.active = true;
pg.view.addEventDBAnimation(coinAni, this.hideCoin, this);
pg.view.playDBAnimation(coinAni, "three", 1);
this.playLocalAudio('coin');
this.scheduleOnce(() => {
this.playLocalAudio('coin');
}, 0.3)
this.scheduleOnce(() => {
this.playLocalAudio('coin');
}, 0.6)
break;
}
}
hideCoin() {
this.scheduleOnce(() => {
pg.view.visible(this.layout_center, false)
pg.event.emit('layer_coin_show_coin_end')
}, 1.0)
}
playLocalAudio(name) {
let ending = pg.view.find(this, `res/${name}`)
pg.audio.playLocalAudio(ending)
}
}
{
"ver": "1.0.8",
"uuid": "7280210e-c21d-4ab8-a9c1-1d8727b60658",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "47713aab-b8a5-494e-a027-eaec5a0f69ce",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.2.9",
"uuid": "8944c192-3675-466f-9f94-8f824c68e822",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}
\ No newline at end of file
// pg.event.once('layer_ending_touch_replay', () => {
// alert('replay')
// })
// pg.event.emit('layer_ending_show')
import pg from "../../scene/pg_hy14_pipei";
const { ccclass, property } = cc._decorator;
@ccclass
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")
pg.view.touchOn(this.replay_btn, this.onTouchReplay, this)
pg.view.touchOn(this.next_btn, this.onTouchNext, this)
pg.event.on('layer_ending_show', (data) => {
this.showLayer(data);
})
}
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")
cc.tween(bg_light).by(2, { angle: 360 }).repeatForever().start();
pg.view.visible(this.layer_center, true)
}
onTouchReplay() {
pg.view.visible(this.layer_center, false)
pg.event.emit('layer_ending_touch_replay');
}
onTouchNext() {
pg.view.visible(this.layer_center, false)
const middleLayer = cc.find('middleLayer');
const middleLayerComponent = middleLayer.getComponent('middleLayer');
const { index, length } = middleLayerComponent.getPageInfo(); // 返回 length:有多少页; index: 当前第几页(从0开始)
if (index == length - 1) {
middleLayerComponent.goNextCross(); // 跳转到下一关卡
} else {
middleLayerComponent.goNextPage(); // 跳转到下一页
}
}
}
{
"ver": "1.0.8",
"uuid": "8aa90d3e-7980-43ef-be5d-3707ef42a804",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "abb5bf98-8e6e-4fda-bdcf-071a0f553e21",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "a5293080-0ee0-4320-804d-3a0173a7c120",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "80d273de-f7a1-45e8-b75c-b4c3032d0b78",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "6cda522a-b8bc-40b4-b8c5-28ccdbd817b4",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1024,
"height": 1024,
"platformSettings": {},
"subMetas": {
"finish": {
"ver": "1.0.4",
"uuid": "df8c0d1b-db97-497e-b721-ebebd22dac62",
"rawTextureUuid": "6cda522a-b8bc-40b4-b8c5-28ccdbd817b4",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -10.5,
"offsetY": 75.5,
"trimX": 1,
"trimY": 1,
"width": 1001,
"height": 871,
"rawWidth": 1024,
"rawHeight": 1024,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{"name":"finish","version":"5.5","frameRate":24,"isGlobal":0,"armature":[{"name":"Armature","animation":[{"name":"finish","ffd":[],"frame":[],"duration":26,"slot":[{"name":"金币底","colorFrame":[{"tweenEasing":0,"color":{"aM":0},"duration":4},{"tweenEasing":0,"color":{"aM":0},"duration":6},{"tweenEasing":0,"color":{"aM":44},"duration":10},{"color":{"aM":0},"duration":6}],"displayFrame":[]},{"name":"圈","colorFrame":[{"tweenEasing":0,"color":{"aM":0},"duration":4},{"tweenEasing":0,"color":{"aM":0},"duration":4},{"tweenEasing":0,"color":{"aM":0},"duration":6},{"tweenEasing":0,"color":{"aM":40},"duration":6},{"color":{"aM":0},"duration":6}],"displayFrame":[]},{"name":"金币","colorFrame":[],"displayFrame":[{"duration":4,"value":-1},{"duration":7,"value":-1},{"duration":15}]},{"name":"条1","colorFrame":[{"color":{"aM":0},"duration":8},{"curve":[0,0,0.34269662921348315,0.9952978056426333],"color":{"aM":22},"duration":11},{"tweenEasing":0,"duration":7},{"color":{"aM":0},"duration":0}],"displayFrame":[]},{"name":"条11","colorFrame":[{"color":{"aM":0},"duration":8},{"curve":[0,0,0.5,1],"color":{"aM":22},"duration":11},{"tweenEasing":0,"duration":7},{"color":{"aM":0},"duration":0}],"displayFrame":[]},{"name":"条111","colorFrame":[{"color":{"aM":0},"duration":8},{"curve":[0,0,0.5,1],"color":{"aM":22},"duration":11},{"tweenEasing":0,"duration":7},{"color":{"aM":0},"duration":0}],"displayFrame":[]},{"name":"条12","colorFrame":[{"color":{"aM":0},"duration":8},{"curve":[0,0,0.5,1],"color":{"aM":22},"duration":11},{"tweenEasing":0,"duration":7},{"color":{"aM":0},"duration":0}],"displayFrame":[]},{"name":"条13","colorFrame":[{"color":{"aM":0},"duration":8},{"curve":[0,0,0.34269662921348315,0.9952978056426333],"color":{"aM":22},"duration":11},{"tweenEasing":0,"duration":7},{"color":{"aM":0},"duration":0}],"displayFrame":[]},{"name":"条121","colorFrame":[{"color":{"aM":0},"duration":8},{"curve":[0,0,0.34269662921348315,0.9952978056426333],"color":{"aM":22},"duration":11},{"tweenEasing":0,"duration":7},{"color":{"aM":0},"duration":0}],"displayFrame":[]},{"name":"条122","colorFrame":[{"color":{"aM":0},"duration":8},{"curve":[0,0,0.34269662921348315,0.9952978056426333],"color":{"aM":22},"duration":11},{"tweenEasing":0,"duration":7},{"color":{"aM":0},"duration":0}],"displayFrame":[]}],"bone":[{"name":"root","translateFrame":[],"rotateFrame":[],"scaleFrame":[]},{"name":"金币底","translateFrame":[],"rotateFrame":[],"scaleFrame":[{"x":1.3,"duration":4,"tweenEasing":0,"y":1.3},{"x":1.3,"duration":6,"tweenEasing":0,"y":1.3},{"duration":16}]},{"name":"圈","translateFrame":[],"rotateFrame":[],"scaleFrame":[{"duration":11},{"duration":9,"tweenEasing":0},{"x":1.4,"duration":6,"y":1.4}]},{"name":"金币","translateFrame":[],"rotateFrame":[],"scaleFrame":[{"duration":11},{"x":0.5,"duration":4,"tweenEasing":0,"y":0.5},{"duration":7,"curve":[0.7359550561797753,0.009404388714733543,1,1],"y":1.1},{"duration":4}]},{"name":"条1","translateFrame":[{"duration":8},{"x":93.3333,"duration":11,"tweenEasing":0,"y":33.3333},{"x":-236.6667,"duration":7,"y":-54.1608}],"rotateFrame":[{"duration":8},{"duration":11,"tweenEasing":0},{"rotate":-93.3665,"duration":7}],"scaleFrame":[{"duration":8},{"x":0.7,"duration":11,"tweenEasing":0,"y":0.7},{"duration":7}]},{"name":"bone","translateFrame":[],"rotateFrame":[{"duration":22,"clockwise":2,"tweenEasing":0},{"duration":4}],"scaleFrame":[]},{"name":"条11","translateFrame":[{"duration":8},{"x":-178.25,"duration":11,"curve":[0,0,0.5,1],"y":33.3333},{"x":-581.1667,"duration":7,"y":-526.7441}],"rotateFrame":[{"duration":8},{"curve":[0,0,0.5,1],"duration":11},{"rotate":-93.3665,"duration":7}],"scaleFrame":[{"duration":8},{"x":0.7,"duration":11,"curve":[0,0,0.5,1],"y":0.7},{"duration":7}]},{"name":"条111","translateFrame":[{"duration":8},{"x":-178.25,"duration":11,"curve":[0,0,0.5,1],"y":33.3333},{"x":146.8333,"duration":7,"y":-138.9941}],"rotateFrame":[{"duration":8},{"curve":[0,0,0.5,1],"duration":11},{"rotate":-93.3665,"duration":7}],"scaleFrame":[{"duration":8},{"x":0.7,"duration":11,"curve":[0,0,0.5,1],"y":0.7},{"duration":7}]},{"name":"条12","translateFrame":[{"duration":8},{"x":93.3333,"duration":11,"curve":[0,0,0.5,1],"y":33.3333},{"x":300.8333,"duration":7,"y":-54.1608}],"rotateFrame":[{"duration":8},{"curve":[0,0,0.5,1],"duration":11},{"rotate":-93.3665,"duration":7}],"scaleFrame":[{"duration":8},{"x":0.7,"duration":11,"curve":[0,0,0.5,1],"y":0.7},{"duration":7}]},{"name":"条13","translateFrame":[{"duration":8},{"x":93.3333,"duration":11,"tweenEasing":0,"y":33.3333},{"x":321,"duration":7,"y":-189.8274}],"rotateFrame":[{"duration":8},{"duration":11,"tweenEasing":0},{"rotate":-34.1966,"duration":7}],"scaleFrame":[{"duration":8},{"x":0.7,"duration":11,"tweenEasing":0,"y":0.7},{"duration":7}]},{"name":"条121","translateFrame":[{"duration":8},{"x":93.3333,"duration":11,"tweenEasing":0,"y":33.3333},{"x":-236.6667,"duration":7,"y":-54.1608}],"rotateFrame":[{"duration":8},{"duration":11,"tweenEasing":0},{"rotate":-93.3665,"duration":7}],"scaleFrame":[{"duration":8},{"x":0.7,"duration":11,"tweenEasing":0,"y":0.7},{"duration":7}]}],"ik":[],"playTimes":0}],"bone":[{"name":"root","transform":{"x":-131.6667,"y":16.6667}},{"name":"圈","transform":{"x":140.655,"y":-240.8618},"parent":"root"},{"name":"金币","transform":{"x":143.8193,"y":-246.4},"parent":"root"},{"name":"条1","transform":{"x":33.3193,"y":-90.0208},"parent":"root"},{"name":"金币底","transform":{"x":146.8193,"y":-242},"parent":"root"},{"name":"bone","transform":{"x":138.33,"y":-245.75},"parent":"root"},{"name":"条11","transform":{"x":323.3193,"scY":0.7,"y":-95.8541,"scX":0.7},"parent":"root"},{"name":"条111","transform":{"x":323.3193,"scY":0.7,"y":-95.8541,"scX":0.7},"parent":"root"},{"name":"条12","transform":{"x":166.6526,"y":-40.0208},"parent":"root"},{"name":"条13","transform":{"x":98.1526,"y":-115.9375},"parent":"root"},{"name":"条121","transform":{"x":33.3193,"y":-90.0208},"parent":"root"}],"skin":[{"name":"","slot":[{"name":"条11","display":[{"name":"金币动画/条","transform":{"x":-270.4571,"skX":-39.1322,"y":73.2524,"skY":-39.1322},"type":"image","path":"金币动画/条"}]},{"name":"圈","display":[{"name":"金币动画/圈","transform":{"x":3.5699,"y":0.3676},"type":"image","path":"金币动画/圈"}]},{"name":"金币底","display":[{"name":"金币动画/金币底","transform":{"x":-3,"y":-0.5},"type":"image","path":"金币动画/金币底"}]},{"name":"金币","display":[{"name":"金币动画/金币","transform":{"y":5.9},"type":"image","path":"金币动画/金币"}]},{"name":"条1","display":[{"name":"金币动画/条","transform":{"x":122.0667,"scY":0.5,"y":-6.3667,"scX":0.5},"type":"image","path":"金币动画/条"}]},{"name":"条111","display":[{"name":"金币动画/条","transform":{"x":-0.1,"y":-0.2},"type":"image","path":"金币动画/条"}]},{"name":"条13","display":[{"name":"金币动画/条","transform":{"x":122.0667,"scY":0.5,"y":-6.3667,"scX":0.5},"type":"image","path":"金币动画/条"}]},{"name":"条12","display":[{"name":"金币动画/条","transform":{"x":-0.1,"y":-0.2},"type":"image","path":"金币动画/条"}]},{"name":"条122","display":[{"name":"金币动画/条","transform":{"x":-0.1,"y":-0.2},"type":"image","path":"金币动画/条"}]},{"name":"条121","display":[]}]}],"defaultActions":[{"gotoAndPlay":"finish"}],"frameRate":24,"slot":[{"name":"金币底","color":{},"parent":"金币底"},{"name":"圈","color":{},"z":1,"parent":"圈"},{"name":"金币","color":{},"z":2,"parent":"金币"},{"name":"条1","color":{},"z":3,"parent":"条1"},{"name":"条11","color":{},"z":4,"parent":"条11"},{"name":"条111","color":{},"z":5,"parent":"条111"},{"name":"条12","color":{},"z":6,"parent":"条12"},{"name":"条13","color":{},"z":7,"parent":"条13"},{"name":"条121","color":{},"z":8,"parent":"root","displayIndex":-1},{"name":"条122","color":{},"z":9,"parent":"条121"}],"type":"Armature","ik":[],"aabb":{"x":-243.44169151262471,"height":497.77919520611704,"y":-469.33333333333337,"width":512}}]}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "a3fdb391-e9ad-464d-ad51-2698de2b38e1",
"subMetas": {}
}
\ No newline at end of file
{"name":"finish","SubTexture":[{"name":"金币动画/金币底","x":1,"height":487,"y":1,"width":487},{"name":"金币动画/圈","x":490,"height":420,"y":1,"width":512},{"name":"金币动画/金币","x":490,"height":449,"y":423,"width":388},{"name":"金币动画/条","x":880,"height":104,"y":423,"width":105}],"height":1024,"imagePath":"finish.png","width":1024}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "c9537625-dbfc-4d95-a3b3-d3d672dc93e6",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "664f0051-39fd-4f00-be8e-9b38b7b09e09",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 714,
"height": 166,
"platformSettings": {},
"subMetas": {
"bg_finish_hy17_hds_hy14_pipei": {
"ver": "1.0.4",
"uuid": "23a8b623-34a7-4290-b6c8-d6092f00b95d",
"rawTextureUuid": "664f0051-39fd-4f00-be8e-9b38b7b09e09",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 714,
"height": 166,
"rawWidth": 714,
"rawHeight": 166,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "68923e19-0a44-4014-996d-ed2c1f3adb8f",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1104,
"height": 1109,
"platformSettings": {},
"subMetas": {
"bg_finishlight_hy17_hds_hy14_pipei": {
"ver": "1.0.4",
"uuid": "25fb3f92-bcc7-4131-9799-223ffe697b15",
"rawTextureUuid": "68923e19-0a44-4014-996d-ed2c1f3adb8f",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1104,
"height": 1109,
"rawWidth": 1104,
"rawHeight": 1109,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "14a91e97-25df-434f-bebc-0fc904a33ded",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 153,
"height": 153,
"platformSettings": {},
"subMetas": {
"btn_next_hy17_hds_hy14_pipei": {
"ver": "1.0.4",
"uuid": "9cddc7ee-9ccf-4dd5-86a6-94b3a5d69135",
"rawTextureUuid": "14a91e97-25df-434f-bebc-0fc904a33ded",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 153,
"height": 153,
"rawWidth": 153,
"rawHeight": 153,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "c50a3c0b-6c2c-4bca-a5f4-ab2a99cd1936",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 153,
"height": 153,
"platformSettings": {},
"subMetas": {
"btn_replay_hy17_hds_hy14_pipei": {
"ver": "1.0.4",
"uuid": "1b782eab-25d2-4314-b83a-258f7e4d7ea4",
"rawTextureUuid": "c50a3c0b-6c2c-4bca-a5f4-ab2a99cd1936",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 153,
"height": 153,
"rawWidth": 153,
"rawHeight": 153,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "4ca1236a-5bad-48ce-87f8-972316595c05",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 67,
"height": 70,
"platformSettings": {},
"subMetas": {
"icon_coin_hy17_hds_hy14_pipei": {
"ver": "1.0.4",
"uuid": "4c1488d1-d283-4f03-864e-742eedadf6d9",
"rawTextureUuid": "4ca1236a-5bad-48ce-87f8-972316595c05",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 67,
"height": 70,
"rawWidth": 67,
"rawHeight": 70,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"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
......@@ -1725,15 +1725,15 @@
"sync": false
},
{
"__type__": "71fd077rCNIKYvVldQChyin",
"__type__": "6da6f8w7IZPyqlhjqf21Gz3",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"jumpHeight": 80,
"isHide": false,
"jumpHeight": 30,
"isHide": true,
"_id": ""
},
{
......
......@@ -55,8 +55,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
960,
540,
0,
0,
0,
......@@ -268,7 +268,7 @@
"__id__": 1
},
"asset": {
"__id__": 0
"__uuid__": "35fbe4f1-249e-4263-90a1-de923c148363"
},
"fileId": "87B5iKbmVCG49S3eGPMX6Y",
"sync": false
......@@ -375,7 +375,7 @@
"__id__": 1
},
"asset": {
"__id__": 0
"__uuid__": "35fbe4f1-249e-4263-90a1-de923c148363"
},
"fileId": "0dJz4b1ElNA4O7qSiigyoD",
"sync": false
......@@ -482,7 +482,7 @@
"__id__": 1
},
"asset": {
"__id__": 0
"__uuid__": "35fbe4f1-249e-4263-90a1-de923c148363"
},
"fileId": "29MTzfz4ZJY5RAZYwGGyzy",
"sync": false
......@@ -589,7 +589,7 @@
"__id__": 1
},
"asset": {
"__id__": 0
"__uuid__": "35fbe4f1-249e-4263-90a1-de923c148363"
},
"fileId": "4bI88i+L9GR5mwmTy9p9U4",
"sync": false
......@@ -704,7 +704,7 @@
"__id__": 1
},
"asset": {
"__id__": 0
"__uuid__": "35fbe4f1-249e-4263-90a1-de923c148363"
},
"fileId": "bfmkl7sk1AkKt8zX7VXGXI",
"sync": false
......@@ -847,7 +847,7 @@
"__id__": 1
},
"asset": {
"__id__": 0
"__uuid__": "35fbe4f1-249e-4263-90a1-de923c148363"
},
"fileId": "9dj4iTb+pEI58ageziAqnd",
"sync": false
......@@ -873,7 +873,7 @@
"__id__": 31
}
],
"_active": false,
"_active": true,
"_components": [
{
"__id__": 34
......@@ -931,7 +931,7 @@
},
{
"__type__": "cc.Node",
"_name": "p1",
"_name": "p0",
"_objFlags": 0,
"_parent": {
"__id__": 21
......@@ -1009,7 +1009,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "84c11178-f263-4e14-aa51-104545bb5499"
"__uuid__": "c9eb055f-e3e0-4f6e-9e05-45d7c4608877"
},
"_type": 0,
"_sizeMode": 1,
......@@ -1031,14 +1031,14 @@
"__id__": 1
},
"asset": {
"__id__": 0
"__uuid__": "35fbe4f1-249e-4263-90a1-de923c148363"
},
"fileId": "fbQ2idx8VGzpMfXJAlUOXZ",
"fileId": "bdZKY4yrNNrp3uiGJ2mSt/",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "p0",
"_name": "p1",
"_objFlags": 0,
"_parent": {
"__id__": 21
......@@ -1116,7 +1116,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "c9eb055f-e3e0-4f6e-9e05-45d7c4608877"
"__uuid__": "84c11178-f263-4e14-aa51-104545bb5499"
},
"_type": 0,
"_sizeMode": 1,
......@@ -1138,9 +1138,9 @@
"__id__": 1
},
"asset": {
"__id__": 0
"__uuid__": "35fbe4f1-249e-4263-90a1-de923c148363"
},
"fileId": "bdZKY4yrNNrp3uiGJ2mSt/",
"fileId": "fbQ2idx8VGzpMfXJAlUOXZ",
"sync": false
},
{
......@@ -1245,7 +1245,7 @@
"__id__": 1
},
"asset": {
"__id__": 0
"__uuid__": "35fbe4f1-249e-4263-90a1-de923c148363"
},
"fileId": "50FwDbDDFGEpKc84rgx9jB",
"sync": false
......@@ -1352,7 +1352,7 @@
"__id__": 1
},
"asset": {
"__id__": 0
"__uuid__": "35fbe4f1-249e-4263-90a1-de923c148363"
},
"fileId": "c0INCALCJCWbSmpeyJ9a58",
"sync": false
......@@ -1390,7 +1390,7 @@
"__id__": 1
},
"asset": {
"__id__": 0
"__uuid__": "35fbe4f1-249e-4263-90a1-de923c148363"
},
"fileId": "c1eTuWbUBDEofGhSF4EZXo",
"sync": false
......@@ -1428,7 +1428,7 @@
"__id__": 1
},
"asset": {
"__id__": 0
"__uuid__": "35fbe4f1-249e-4263-90a1-de923c148363"
},
"fileId": "2ertaiEAVHrqIyQ0eZHP8i",
"sync": false
......@@ -1476,7 +1476,7 @@
"__id__": 1
},
"asset": {
"__id__": 0
"__uuid__": "35fbe4f1-249e-4263-90a1-de923c148363"
},
"fileId": "",
"sync": false
......
......@@ -30,7 +30,7 @@
"__id__": 34
}
],
"_active": false,
"_active": true,
"_components": [
{
"__id__": 43
......@@ -64,8 +64,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
960,
540,
0,
0,
0,
......@@ -110,7 +110,7 @@
"__id__": 12
}
],
"_active": true,
"_active": false,
"_components": [],
"_prefab": {
"__id__": 15
......@@ -564,7 +564,7 @@
"__id__": 20
}
],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 23
......@@ -647,8 +647,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 2000,
"height": 2000
"width": 5000,
"height": 5000
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -895,7 +895,7 @@
"__id__": 29
}
],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 32
......@@ -978,8 +978,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 2000,
"height": 2000
"width": 5000,
"height": 5000
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -1226,7 +1226,7 @@
"__id__": 38
}
],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 41
......@@ -1309,8 +1309,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 2000,
"height": 2000
"width": 5000,
"height": 5000
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......
......@@ -8,11 +8,11 @@ import pg from "../../scene/pg_hy14_pipei";
const { ccclass, property } = cc._decorator;
@ccclass
export default class Candy extends cc.Component {
@property(cc.Float)
private jumpHeight: number = 80;
@property(cc.Boolean)
......@@ -60,3 +60,4 @@ export default class Candy extends cc.Component {
{
"ver": "1.0.8",
"uuid": "71fd0efb-ac23-4829-8bd5-95d4028728a7",
"uuid": "6da6ff30-ec86-4fca-a961-8ea7f6d46cf7",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
......
// pg.event.emit('img_voice_play_voice_start')
// pg.event.emit('img_voice_play_voice_end')
import pg from "../../scene/pg_hy14_pipei";
const { ccclass, property } = cc._decorator;
@ccclass
......@@ -59,4 +55,3 @@ export default class ImgVoice extends cc.Component {
{
"ver": "1.0.8",
"uuid": "f6509267-2c09-4a7d-9f55-2c55a541c364",
"uuid": "8fa11bf6-14c4-45e5-a614-436c70dffb2c",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
......
// pg.event.emit('layer_record_open', {
// letter: 'test',
// targetTime: 10
// })
// pg.event.emit('layer_record_close')
//pg.event.on('layer_record_start_record',()=>{});
//pg.event.on('layer_record_end_record',()=>{});
import pg from "../../scene/pg_hy14_pipei";
import pg from "../../scene/pg_hy14_pipei";
const { ccclass, property } = cc._decorator;
......@@ -16,21 +23,29 @@ export default class LayerRecord extends cc.Component {
let btn_play = pg.view.find(this.layout_record, 'btn_play');
btn_play.active = false;
this.initEvent();
pg.event.emit('layer_record_setting', {
letter: 'test',
targetTime: 10
})
this.showVoiceWhite();
}
private letter: string;
private targetTime: number;
private recordAudio: string;
initEvent() {
pg.event.on('layer_record_setting', (data) => {
pg.event.on('layer_record_open', (data) => {
this.layout_record.active = true;
this.letter = data.letter
this.targetTime = data.targetTime
})
pg.event.on('layer_record_close', (data) => {
this.layout_record.active = false;
if (this.recordAudioId) {
cc.audioEngine.stopEffect(this.recordAudioId)
}
this.playVoiceEnd();
})
let btn_record = pg.view.find(this.layout_record, 'btn_record');
let btn_play = pg.view.find(this.layout_record, 'btn_play');
btn_record.on(cc.Node.EventType.TOUCH_START, this.onTouchRecord, this);
btn_record.on(cc.Node.EventType.TOUCH_END, this.onTouchRecordEnd, this);
btn_play.on(cc.Node.EventType.TOUCH_END, this.onTouchPlayRecord, this);
}
showVoiceWhite() {
......@@ -60,6 +75,68 @@ export default class LayerRecord extends cc.Component {
let record_time = pg.view.find(this.layout_record, 'record_time');
record_time.getComponent(cc.Sprite).fillRange = 0;
}
showPlay() {
let btn_play = pg.view.find(this.layout_record, 'btn_play')
btn_play.active = !!this.recordAudio
let p0 = pg.view.find(btn_play, 'p0')
let p1 = pg.view.find(btn_play, 'p1')
let p2 = pg.view.find(btn_play, 'p2')
let p3 = pg.view.find(btn_play, 'p3')
p0.active = true;
p1.active = false;
p2.active = false;
p3.active = false;
}
private recordAudioId;
onTouchPlayRecord() {
if (!this.recordAudio) return;
if (this.playVoiceCount && this.playVoiceCount > -1) {
if (this.recordAudioId) {
cc.audioEngine.stopEffect(this.recordAudioId)
}
this.playVoiceEnd();
} else {
this.playVoiceStart();
pg.audio.playAudioByUrl(this.recordAudio, () => {
this.recordAudioId = null;
this.playVoiceEnd();
}, (audioId) => {
this.recordAudioId = audioId;
});
}
}
private playVoiceCount: number;
playVoiceStart() {
if (this.playVoiceCount > 0) return;
this.playVoiceCount = 0;
this.schedule(this.playVoiceRunning, 0.3)
}
playVoiceRunning() {
this.playVoiceCount++;
let btn_play = pg.view.find(this.layout_record, 'btn_play');
let p0 = btn_play.getChildByName('p0')
let p1 = btn_play.getChildByName('p1')
let p2 = btn_play.getChildByName('p2')
let p3 = btn_play.getChildByName('p3')
p0.active = false;
p1.active = this.playVoiceCount % 3 == 0;
p2.active = this.playVoiceCount % 3 == 1;
p3.active = this.playVoiceCount % 3 == 2;
}
playVoiceEnd() {
let btn_play = pg.view.find(this.layout_record, 'btn_play');
this.unschedule(this.playVoiceRunning)
this.playVoiceCount = 0;
let p0 = btn_play.getChildByName('p0')
let p1 = btn_play.getChildByName('p1')
let p2 = btn_play.getChildByName('p2')
let p3 = btn_play.getChildByName('p3')
p0.active = true;
p1.active = false;
p2.active = false;
p3.active = false;
}
protected update(dt: number): void {
......@@ -67,11 +144,14 @@ export default class LayerRecord extends cc.Component {
}
//按钮触发,使用的方法
async onTouchRecord() {
this.recordAudio = '';
this.showPlay();
let AniNode = pg.view.find(this.layout_record, 'AniNode');
AniNode.active = true;
this.showTimeStart();
cc.audioEngine.stopAllEffects();
pg.event.emit('layer_record_start_record');
courseware && courseware.startTest(this.letter); //开始录音
}
async onTouchRecordEnd() {
......@@ -83,13 +163,14 @@ export default class LayerRecord extends cc.Component {
"refText": "I haven't found anything out about him yet.",
"recordId": "6144295213f0a2200000ed93",
"eof": 1,
audioUrl: 'http://staging-teach.cdn.ireadabc.com/43839adb578c7e01456748b8a176a0c3_l.mp3',
"result": {
"pronunciation": 25,
"resource_version": "3.1.0",
"fluency": 60,
"rhythm": 90,
"kernel_version": "5.2.4",
"overall": 25,//75
"overall": 8,//75
"integrity": 100,
"duration": "6.779",
"rear_tone": "fall",
......@@ -98,14 +179,20 @@ export default class LayerRecord extends cc.Component {
"tokenId": "6144295408558b08dd000001",
"applicationId": "154838659000009e"
}
if (!courseware) return this.recrodEnd(testData)
courseware && courseware.stopTest((data) => {
data = JSON.parse(data);
this.recrodEnd(data);
pg.event.emit('layer_record_end_record');
if (!courseware) {
return this.recrodEnd(testData)
}
courseware && courseware.stopTest((res) => {
res = JSON.parse(res);
this.recrodEnd(res);
}); //结束录音
}
async recrodEnd(data) {
this.recordAudio = data.audioUrl;
this.showPlay();
let score = data.result.overall;
this.layout_record.active = false;
pg.event.emit('layer_record_score', score);
}
}
......@@ -114,4 +201,3 @@ export default class LayerRecord extends cc.Component {
// pg.event.on('layer_right_show_excellent_end', () => {
// pg.event.once('layer_right_show_excellent_end', () => {
// alert('test')
// })
// pg.event.emit('layer_right_show_excellent')
// pg.event.on('layer_right_show_good_end', () => {
// pg.event.once('layer_right_show_good_end', () => {
// alert('test')
// })
// pg.event.emit('layer_right_show_good')
// pg.event.on('layer_right_show_tryagain_end', () => {
// pg.event.once('layer_right_show_tryagain_end', () => {
// alert('test')
// })
// pg.event.emit('layer_right_show_tryagain')
import pg from "../../scene/pg_hy14_pipei";
import pg from "../../scene/pg_hy14_pipei";
const { ccclass, property } = cc._decorator;
......@@ -112,4 +112,3 @@ export default class LayerRight extends cc.Component {
{
"ver": "1.1.0",
"uuid": "086fa3e3-d143-413b-95f7-049127b48c8d",
"subMetas": {}
}
\ No newline at end of file
import ImgVoice from "../common/script/ImgVoice_hy14_pipei";
export let imageZize = {
width: 1000,
height: 600
}
export class OptionJigsaw {
type;
txt;
......@@ -118,8 +127,8 @@ export default class Game {
}
public pointsArr;
private changepoints(data) {
let scX = 1279 / data.bgItem.rect.width;
let scY = 666 / data.bgItem.rect.height;
let scX = imageZize.width / data.bgItem.rect.width;
let scY = imageZize.height / data.bgItem.rect.height;
let px = data.bgItem.rect.x;
let py = data.bgItem.rect.y;
this.pointsArr = [];
......@@ -188,3 +197,4 @@ export default class Game {
let win: any = window;
win.Game = Game;
This diff is collapsed.
import { asyncDelay, exchangeNodePos, getSprNode, onHomeworkFinish, onHomeworkStart, playAudio } from "../script/util_hy14_pipei";
import { MyCocosSceneComponent } from "../script/MyCocosSceneComponent_hy14_pipei";
import Game, { ItemJigsaw, OptionJigsaw } from "./Game_hy14_pipei";
import Game, { imageZize, ItemJigsaw, OptionJigsaw } from "./Game_hy14_pipei";
import pg from "./pg_hy14_pipei";
const { ccclass, property } = cc._decorator;
......@@ -27,7 +27,7 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent {
// TODO 加载完成后的逻辑写在这里, 下面的代码仅供参考
this.initData();
this.initView();
this.initEvent();
this.initListener();
}
@property(cc.Node)
layout_sort: cc.Node = null;
......@@ -41,8 +41,31 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent {
item: cc.Node = null;
private initListener() {
pg.event.on("layer_record_score", (score) => {
});
pg.event.on('npc_voice_play_voice_end', () => {
})
pg.event.emit('npc_layer_back_init', this.data)
pg.event.on('layer_ending_touch_replay', () => {
this.replay();
})
pg.event.on('layer_coin_show_coin_end', () => {
pg.event.emit('layer_ending_show', { coin: 3 })
})
pg.event.on("gameOver", () => { this.gameOver() })
cc.find("ScrollView", this.node).on("scroll-began", this.onScroll, this);
}
replay() {
this.initData();
this.initView();
}
initData() {
Game.getIns().init(this.data);
......@@ -58,18 +81,10 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent {
//自动创建卡片
let itembg = cc.find("itembg", this.node);
pg.view.setNetImg(itembg, Game.getIns().image, { w: 1279, h: 666 });
pg.view.setNetImg(itembg, Game.getIns().image, { w: imageZize.width, h: imageZize.height });
this.createCrads();
}
initEvent() {
// this.page_view.on('page-turning', this.pageTurning, this);
// pg.event.on("startGame", () => { this.startGame() })
// pg.event.on("nextPage", () => { this.nextPage() })
pg.event.on("gameOver", () => { this.gameOver() })
cc.find("ScrollView", this.node).on("scroll-began", this.onScroll, this);
}
protected update(dt: number): void {
}
......@@ -136,6 +151,7 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent {
ch.active = true;
let desc = cc.find("desc", ch);
desc.getComponent(cc.Label).string = dt.text;
desc.active = true;
let data: any = {};
data.text = dt.text;
data.parent = ch;
......@@ -286,6 +302,10 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent {
gameOver() {
this.log("over ~~~~~~~~~~~~~~")
pg.event.once('layer_right_show_excellent_end', () => {
pg.event.emit('layer_coin_show_coin', 3) //1 2 3硬币数量
})
pg.event.emit("layer_right_show_excellent");
}
......@@ -300,3 +320,4 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent {
}
}
......@@ -531,14 +531,16 @@ let pg = {
}
},
audio: {
playAudioByUrl(audio_url) {
playAudioByUrl(audio_url, cb = null, loadCb = null) {
return new Promise((resolve, reject) => {
if (!audio_url) return resolve(null);
cc.assetManager.loadRemote(audio_url, (err, audioClip: any) => {
const audioId = cc.audioEngine.play(audioClip, false, 0.8);
cc.audioEngine.setFinishCallback(audioId, () => {
cb && cb();
resolve(audioId);
});
loadCb && loadCb(audioId);
});
});
},
......@@ -551,6 +553,14 @@ let pg = {
});
})
},
playLocalAudio(audio: cc.Node) {
return new Promise((resolve, reject) => {
const id = cc.audioEngine.playEffect(audio.getComponent(cc.AudioSource).clip, false);
cc.audioEngine.setFinishCallback(id, () => {
resolve(id);
});
})
},
stopAudio(audioId) {
if (!audioId) return;
cc.audioEngine.stopEffect(audioId);
......@@ -581,3 +591,4 @@ let pg = {
event: Emitter.getInstance()
};
export default pg;
......@@ -177,3 +177,4 @@ export class MyCocosSceneComponent extends cc.Component {
}
}
}
export const defaultData = {
"points": "",
"questionScore": 0,
"questions": [{
"options": [{
"type": "img",
"image": "",
"audio": "",
"text": "",
"time": "",
"right": false
}, {
"type": "img",
"image": "",
"audio": "",
"text": "",
"time": "",
"right": false
}, {
"type": "img",
"image": "",
"audio": "",
"text": "",
"time": "",
"right": false
}
],
"type": "img"
}
],
"bgItem": {
"url": "http://staging-teach.cdn.ireadabc.com/933163fae966edff0633a0bb97e5c5bc.jpg",
"rect": {
......@@ -108,7 +135,12 @@ export const defaultData = {
}
}
],
"questionText": ""
"questionText": "",
"npcTitle": "may",
"npcAudio": "http://staging-teach.cdn.ireadabc.com/36067f9e2415d59fa37c3795a3929087_l.mp3",
"npcAudioName": "bear_3.mp3"
}
......@@ -442,3 +442,4 @@ export function onHomeworkStart(cb) {
cb && cb(null);
}
}
......@@ -48,6 +48,7 @@ export class AudioRecorderComponent implements OnInit, OnChanges, OnDestroy {
@Output() audioUploaded = new EventEmitter();
@Output() audioUploadFailure = new EventEmitter();
@Output() audioRemoved = new EventEmitter();
@Output() audioName = new EventEmitter();
percent = 0;
progress = 0;
recorder: any;
......@@ -186,8 +187,13 @@ export class AudioRecorderComponent implements OnInit, OnChanges, OnDestroy {
break;
case 'success':
this.isUploading = false;
let url = info.file.response.url;
url = url.substring(0, url.lastIndexOf(".")) + "_l.mp3";
info.file.response.url = url;
info.file.response.audioName = info.file.name;
this.uploadSuccess(info.file.response);
this.audioUploaded.emit(info.file.response);
this.audioName.emit(info.file.name);
break;
case 'progress':
this.progress = parseInt(info.event.percent, 10);
......
......@@ -66,15 +66,13 @@ export class ComponentBase {
* 储存音频数据
* @param e
*/
onAudioUploadSuccess(e, key, it = this.item) {
onAudioUploadSuccess(e, key, it = this.item, audioName) {
let url = e.url;
let sp = url.split(".mp3");
let u = sp[0] + "_l.mp3";
it[key] = u;
it["audioName"] = e.name || "";
it[key] = url;
it[audioName] = e.audioName || "";
console.log(JSON.stringify(e));
this.save();
}
save() {
(<any>window).courseware.setData(this.item, null, this.saveKey);
this.itemStr = JSON.stringify(this.item, null, 4).trim();
......
......@@ -76,26 +76,45 @@
<div style="padding: 10px;background-color: #fff;">
<div class="border-dashed" style="margin: 20px;width: 1300px;">
<span style="font-size: 20px;">标题: </span>
<input type="text" nz-input [(ngModel)]="item.npcTitle" (blur)="save()">
<span style="font-size: 20px;">npc音频: </span>
<div style="display:flex ;">
<div>
<app-audio-recorder [audioUrl]="item.npcAudio"
(audioUploaded)="onAudioUploadSuccess($event, 'npcAudio',item,'npcAudioName')">
</app-audio-recorder>
</div>
<div style="margin: 5px">
<span>{{ item.npcAudioName}}</span>
</div>
</div>
<div style="padding: 10px;background-color: #fff;">
<div class="border-dashed" style="margin: 20px;width: 1200px;">
<div class="border-dashed" style="margin: 20px;width: 1000px;">
<h2>热区配置:</h2>
<app-custom-hot-zone [bgItem]="item.bgItem" [hotZoneItemArr]="item.hotZoneItemArr"
[customTypeGroupArr]="customTypeGroupArr" (save)="saveHotZone(item, $event)">
</app-custom-hot-zone>
</div>
</div>
</div>
<div class="border-dashed" style="margin: 20px;width: 1000px;">
<h2>热区配置:</h2>
<app-custom-hot-zone [bgItem]="item.bgItem" [hotZoneItemArr]="item.hotZoneItemArr"
[customTypeGroupArr]="customTypeGroupArr" (save)="saveHotZone(item, $event)">
</app-custom-hot-zone>
</div>
</div>
<nz-modal [(nzVisible)]="isVisible" [nzTitle]="null" [nzContent]="modalContent" [nzFooter]="modalFooter"
(nzOnCancel)="handleCancel()">
<ng-template #modalContent>
<p>{{deleteTitle}}</p>
</ng-template>
<ng-template #modalFooter>
<button nz-button nzType="default" (click)="handleCancel()">取消</button>
<button nz-button nzType="primary" (click)="handleOk()">确定</button>
</ng-template>
</nz-modal>
</div>
\ No newline at end of file
<nz-modal [(nzVisible)]="isVisible" [nzTitle]="null" [nzContent]="modalContent" [nzFooter]="modalFooter"
(nzOnCancel)="handleCancel()">
<ng-template #modalContent>
<p>{{deleteTitle}}</p>
</ng-template>
<ng-template #modalFooter>
<button nz-button nzType="default" (click)="handleCancel()">取消</button>
<button nz-button nzType="primary" (click)="handleOk()">确定</button>
</ng-template>
</nz-modal>
</div>
\ No newline at end of file
......@@ -119,6 +119,9 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
bgItem: '',
hotZoneItemArr: [],
npcTitle: "",
npcAudio: "",
npcAudioName: '',
questionText: "",
......@@ -143,6 +146,9 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
this.handleCancel();
}
init(): void {
if (!this.item.npcTitle) this.item.npcTitle = '';
if (!this.item.npcAudio) this.item.npcAudio = '';
if (!this.item.npcAudioName) this.item.npcAudioName = '';
console.log(new MetaFormCreator().create());
// if (this.item.questions.length == 0) {
......
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