Commit 66a10e81 authored by Tt's avatar Tt

增加中间流程

parent 165901a1
{
"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 diff is collapsed.
{
"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.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": {
"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
This diff is collapsed.
{
"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.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": {
"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
This diff is collapsed.
{
"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_hy01_danci";
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_hy01_danci";
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": {
"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": {
"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": {
"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": {
"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": {
"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
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
"__id__": 34 "__id__": 34
} }
], ],
"_active": false, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 43 "__id__": 43
...@@ -64,8 +64,8 @@ ...@@ -64,8 +64,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
0, 960,
0, 540,
0, 0,
0, 0,
0, 0,
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
"__id__": 12 "__id__": 12
} }
], ],
"_active": true, "_active": false,
"_components": [], "_components": [],
"_prefab": { "_prefab": {
"__id__": 15 "__id__": 15
...@@ -564,7 +564,7 @@ ...@@ -564,7 +564,7 @@
"__id__": 20 "__id__": 20
} }
], ],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 23 "__id__": 23
...@@ -647,8 +647,8 @@ ...@@ -647,8 +647,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 2000, "width": 5000,
"height": 2000 "height": 5000
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -895,7 +895,7 @@ ...@@ -895,7 +895,7 @@
"__id__": 29 "__id__": 29
} }
], ],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 32 "__id__": 32
...@@ -978,8 +978,8 @@ ...@@ -978,8 +978,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 2000, "width": 5000,
"height": 2000 "height": 5000
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -1226,7 +1226,7 @@ ...@@ -1226,7 +1226,7 @@
"__id__": 38 "__id__": 38
} }
], ],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 41 "__id__": 41
...@@ -1309,8 +1309,8 @@ ...@@ -1309,8 +1309,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 2000, "width": 5000,
"height": 2000 "height": 5000
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
......
...@@ -14,6 +14,7 @@ export default class LayerRecord extends cc.Component { ...@@ -14,6 +14,7 @@ export default class LayerRecord extends cc.Component {
let btn_play = pg.view.find(this.layout_record, 'btn_play'); let btn_play = pg.view.find(this.layout_record, 'btn_play');
btn_play.active = false; btn_play.active = false;
this.initEvent(); this.initEvent();
this.showVoiceWhite();
pg.event.emit('layer_record_setting', { pg.event.emit('layer_record_setting', {
letter: 'test', letter: 'test',
targetTime: 10 targetTime: 10
......
// pg.event.on('layer_right_show_excellent_end', () => { // pg.event.once('layer_right_show_excellent_end', () => {
// alert('test') // alert('test')
// }) // })
// pg.event.emit('layer_right_show_excellent') // 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') // alert('test')
// }) // })
// pg.event.emit('layer_right_show_good') // 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') // alert('test')
// }) // })
// pg.event.emit('layer_right_show_tryagain') // pg.event.emit('layer_right_show_tryagain')
......
This diff is collapsed.
...@@ -42,10 +42,14 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -42,10 +42,14 @@ export default class SceneComponent extends MyCocosSceneComponent {
_cantouch = null; _cantouch = null;
private list: Array<{ type, text, right, imgage, duration, content, audio }>; private list: Array<{ type, text, right, imgage, duration, content, audio }>;
private recordFlag: boolean;//录音模式 private recordFlag: boolean;//录音模式
private score: number;
private tempScore: number;
initData() { initData() {
// 所有全局变量 默认都是null // 所有全局变量 默认都是null
this._cantouch = true; this._cantouch = true;
let data = this.data; let data = this.data;
this.score = 0;
this.tempScore = 0;
this.recordFlag = data.recordFlag; this.recordFlag = data.recordFlag;
this.list = data.questions[0].options; this.list = data.questions[0].options;
this.layers = []; this.layers = [];
...@@ -62,7 +66,9 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -62,7 +66,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.layer_word = pg.view.find(this, 'layer_word') this.layer_word = pg.view.find(this, 'layer_word')
this.layer_word_little = pg.view.find(this, 'layer_word_little') this.layer_word_little = pg.view.find(this, 'layer_word_little')
} }
resetView() {
this.layer_game.removeAllChildren();
}
initListener() { initListener() {
pg.event.on('layer_record_score', (score) => { pg.event.on('layer_record_score', (score) => {
this.onRecorScore(score); this.onRecorScore(score);
...@@ -109,9 +115,11 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -109,9 +115,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
pg.event.emit('img_voice_play_voice_start') pg.event.emit('img_voice_play_voice_start')
pg.audio.playAudioByUrl(this.CurrentData.audio, () => { pg.audio.playAudioByUrl(this.CurrentData.audio, () => {
pg.event.emit('img_voice_play_voice_end') pg.event.emit('img_voice_play_voice_end')
this.scheduleOnce(() => { pg.event.once('layer_coin_show_coin_end', () => {
this.nextLayer(); this.nextLayer();
}, 2) }) // 动画回调\
this.score += 3;
pg.event.emit('layer_coin_show_coin', 3) //1 2 3硬币数量
}) })
} }
} }
...@@ -119,21 +127,40 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -119,21 +127,40 @@ export default class SceneComponent extends MyCocosSceneComponent {
onRecorScore(score) { onRecorScore(score) {
this.layer_record.active = false; this.layer_record.active = false;
if (score < 10) { if (score < 10) {
pg.event.on('layer_right_show_tryagain_end', () => { pg.event.once('layer_right_show_tryagain_end', () => {
// alert('test') this.tempScore += 1;
if (this.recordFlag) { if (this.tempScore == 2) {
this.layer_record.active = true; this.score += 1;
this.tempScore = 0;
pg.event.once('layer_coin_show_coin_end', () => {
this.nextLayer();
}) // 动画回调
pg.event.emit('layer_coin_show_coin', 1) //1 2 3硬币数量
} else {
if (this.recordFlag) {
this.layer_record.active = true;
}
} }
}) })
pg.event.emit('layer_right_show_tryagain') pg.event.emit('layer_right_show_tryagain')
} else if (score < 60) { } else if (score < 60) {
pg.event.on('layer_right_show_good_end', () => { pg.event.once('layer_right_show_good_end', () => {
this.nextLayer(); this.score += 2;
this.tempScore = 0;
pg.event.once('layer_coin_show_coin_end', () => {
this.nextLayer();
}) // 动画回调
pg.event.emit('layer_coin_show_coin', 1) //1 2 3硬币数量
}) })
pg.event.emit('layer_right_show_good') pg.event.emit('layer_right_show_good')
} else { } else {
pg.event.on('layer_right_show_excellent_end', () => { pg.event.once('layer_right_show_excellent_end', () => {
this.nextLayer(); this.score += 3
this.tempScore = 0;
pg.event.once('layer_coin_show_coin_end', () => {
this.nextLayer();
}) // 动画回调
pg.event.emit('layer_coin_show_coin', 3) //1 2 3硬币数量
}) })
pg.event.emit('layer_right_show_excellent') pg.event.emit('layer_right_show_excellent')
} }
...@@ -164,8 +191,17 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -164,8 +191,17 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.startPlay(); this.startPlay();
}, 3) }, 3)
} }
replay() {
this.initData();
this.resetView();
this.initGame();
this.startGame();
}
gameOver() { gameOver() {
pg.event.on('layer_ending_touch_replay', () => {
this.replay();
})
pg.event.emit('layer_ending_show', { coin: this.score })
} }
createLayer() { createLayer() {
......
export const defaultData = export const defaultData =
{ {
"recordFlag": false, "recordFlag": true,
"title": "test", "title": "test",
"audio_url": '', "audio_url": '',
npcTitle: "I show info", npcTitle: "I show info",
......
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