Commit 9d75b679 authored by Tt's avatar Tt

init

parent 3b680f1f
{
"ver": "1.1.2",
"uuid": "0644b079-4147-489d-ad68-72f2ca1ffe1e",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "f0680ae0-c079-45ef-abd7-9e63d90b982b",
"uuid": "d7ee13c8-7c6f-4ed4-bf81-c85ae91edfa9",
"downloadMode": 0,
"duration": 0.130612,
"duration": 7.74,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "fc2be55f-3d94-44e0-9ebf-09e0eaa47873",
"downloadMode": 0,
"duration": 10.944,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "4d2df5f4-a774-4e06-a410-4e38195952ad",
"downloadMode": 0,
"duration": 0.972,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "0d2dd7a8-9bc2-4cd5-a432-a13f8fb43033",
"downloadMode": 0,
"duration": 1.188,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "a544c1e7-32f5-4754-95a2-823398db0dcc",
"downloadMode": 0,
"duration": 0.287347,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "293ae196-a9b5-4da0-a0b6-597baa25f7b1",
"downloadMode": 0,
"duration": 0.365714,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "b733b7d3-4082-4320-9fe0-2ce28088b687",
"downloadMode": 0,
"duration": 0.966531,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "e87d3f15-54b2-4a37-9793-9923fa34fda9",
"downloadMode": 0,
"duration": 0.626939,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "d9be9283-652e-44da-98d6-680406e71a03",
"downloadMode": 0,
"duration": 0.168,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "7bf9c308-8dd5-411d-8770-ddc8341386d0",
"downloadMode": 0,
"duration": 0.39185,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "ac17bb63-beac-4d42-bc52-1d53b848082f",
"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": "42cb15db-315a-4d11-9814-0fe5f8808a72",
"subMetas": {}
}
\ No newline at end of file
{"name":"mao","imagePath":"mao_tex.png","SubTexture":[{"name":"猫01/影子","x":1,"height":66,"y":343,"width":337},{"name":"猫01/尾巴","x":1,"height":109,"y":188,"width":175},{"name":"猫01/右腿","x":178,"height":117,"y":188,"width":104},{"name":"猫01/左腿","x":1,"height":115,"y":569,"width":64},{"name":"猫01/右手","x":427,"height":122,"y":590,"width":69},{"name":"猫01/左手","x":301,"height":74,"y":590,"width":124},{"name":"猫01伸/左手伸直","x":299,"height":169,"y":1,"width":168},{"name":"猫01伸/右手伸直","x":299,"height":169,"y":172,"width":168},{"name":"猫01/身体","x":340,"height":180,"y":343,"width":122},{"name":"猫01/领带","x":1,"height":156,"y":411,"width":120},{"name":"猫01/右耳","x":155,"height":76,"y":602,"width":90},{"name":"猫01/左耳","x":67,"height":85,"y":602,"width":86},{"name":"猫01/组_1","x":1,"height":185,"y":1,"width":296},{"name":"猫01/右眼","x":1,"height":60,"y":686,"width":59},{"name":"猫01/右眉毛","x":67,"height":5,"y":595,"width":33},{"name":"猫01/左眼","x":247,"height":60,"y":666,"width":59},{"name":"猫01/左眉毛","x":247,"height":12,"y":602,"width":31},{"name":"猫01/眼镜","x":301,"height":63,"y":525,"width":170},{"name":"猫01/胡子","x":123,"height":85,"y":515,"width":176},{"name":"猫01/鼻子","x":67,"height":24,"y":569,"width":28},{"name":"猫01/嘴","x":1,"height":30,"y":299,"width":65},{"name":"猫01/帽子","x":123,"height":102,"y":411,"width":158}],"height":1024,"width":512}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "b2242a6f-c54f-4b2d-8151-89a713576e41",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "c8f02f6a-80f7-4712-8a8c-26db0a90ab03",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 512,
"height": 1024,
"platformSettings": {},
"subMetas": {
"mao_tex": {
"ver": "1.0.4",
"uuid": "837a88a0-d171-4421-8e58-63a525eabc62",
"rawTextureUuid": "c8f02f6a-80f7-4712-8a8c-26db0a90ab03",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -7.5,
"offsetY": 138.5,
"trimX": 1,
"trimY": 1,
"width": 495,
"height": 745,
"rawWidth": 512,
"rawHeight": 1024,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "6761fd57-5a32-4069-97fb-394f948fce55",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{"frameRate":24,"name":"车尾气","version":"5.5","compatibleVersion":"5.5","armature":[{"type":"Armature","frameRate":24,"name":"Armature","aabb":{"x":-0.02,"y":-75.05,"width":145,"height":75},"bone":[{"name":"root"}],"slot":[{"name":"4","parent":"root"},{"name":"3","parent":"root"},{"name":"2","parent":"root"},{"name":"1","parent":"root"}],"skin":[{"slot":[{"name":"3","display":[{"name":"车 尾气/3","transform":{"x":58.98,"y":-29.05}}]},{"name":"4","display":[{"name":"车 尾气/4","transform":{"x":94.48,"y":-39.05}}]},{"name":"1","display":[{"name":"车 尾气/1","transform":{"x":17.48,"y":-10.05}}]},{"name":"2","display":[{"name":"车 尾气/2","transform":{"x":33.98,"y":-17.55}}]}]}],"animation":[{"duration":40,"playTimes":0,"name":"normal","bone":[{"name":"root","translateFrame":[{"duration":10,"tweenEasing":0},{"duration":10,"tweenEasing":0,"x":0.81},{"duration":10,"tweenEasing":0,"x":-0.41},{"duration":10,"tweenEasing":0,"x":1.61},{"duration":0}]}],"slot":[{"name":"4","colorFrame":[{"duration":20,"tweenEasing":0,"value":{"aM":0}},{"duration":10,"tweenEasing":0,"value":{"aM":0}},{"duration":10,"tweenEasing":0},{"duration":0,"value":{"aM":0}}]},{"name":"3","colorFrame":[{"duration":10,"tweenEasing":0,"value":{"aM":0}},{"duration":10,"tweenEasing":0,"value":{"aM":0}},{"duration":10,"tweenEasing":0},{"duration":10,"tweenEasing":0},{"duration":0,"value":{"aM":0}}]},{"name":"2","colorFrame":[{"duration":10,"tweenEasing":0,"value":{"aM":0}},{"duration":20,"tweenEasing":0},{"duration":10,"tweenEasing":0},{"duration":0,"value":{"aM":0}}]}]}],"defaultActions":[{"gotoAndPlay":"normal"}]}]}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "19545f35-d966-469d-b38d-7e7c259be583",
"subMetas": {}
}
\ No newline at end of file
{"width":128,"imagePath":"车尾气_tex.png","height":128,"name":"车尾气","SubTexture":[{"width":101,"y":1,"height":72,"name":"车 尾气/4","x":1},{"width":72,"y":75,"height":50,"name":"车 尾气/3","x":1},{"width":44,"y":75,"height":29,"name":"车 尾气/2","x":75},{"width":35,"y":106,"height":20,"name":"车 尾气/1","x":75}]}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "9b3a5033-22d2-45da-adc1-72b4f923d49f",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "746ae0c5-fa23-4bfc-9f8a-8b3e7d740ffd",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 128,
"height": 128,
"platformSettings": {},
"subMetas": {
"车尾气_tex": {
"ver": "1.0.4",
"uuid": "860eaea9-8d23-4e34-819a-fcec8d74c471",
"rawTextureUuid": "746ae0c5-fa23-4bfc-9f8a-8b3e7d740ffd",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -4,
"offsetY": 0.5,
"trimX": 1,
"trimY": 1,
"width": 118,
"height": 125,
"rawWidth": 128,
"rawHeight": 128,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "70b06f27-303c-4ea7-ab54-90e916ebd541",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{"frameRate":24,"name":"烟花","version":"5.5","compatibleVersion":"5.5","armature":[{"type":"Armature","frameRate":24,"name":"Armature","aabb":{"x":-57.5,"y":-420,"width":152,"height":97},"bone":[{"name":"root"},{"length":84,"name":"烟花","parent":"root","transform":{"x":-3,"y":-332,"skX":-91.3639,"skY":-91.3639}}],"slot":[{"name":"烟花","parent":"烟花"},{"displayIndex":-1,"name":"1","parent":"root"}],"skin":[{"slot":[{"name":"烟花","display":[{"name":"烟花/烟花","transform":{"x":38.98,"y":22.43,"skX":91.36,"skY":91.36}}]},{"name":"1","display":[{"name":"烟花/1","transform":{"x":-3,"y":-385.5}},{"name":"烟花/2","transform":{"x":-2,"y":-406}},{"name":"烟花/3","transform":{"y":-425.5}},{"name":"烟花/4","transform":{"x":-6,"y":-434}},{"name":"烟花/5","transform":{"x":-7.5,"y":-439.5}},{"name":"烟花/6","transform":{"x":-11,"y":-439.5}},{"name":"烟花/7","transform":{"x":-15.5,"y":-431.5}},{"name":"烟花/8","transform":{"x":-5,"y":-425.5}},{"name":"烟花/9","transform":{"y":-420}}]}]}],"animation":[{"duration":30,"playTimes":0,"name":"normal","bone":[{"name":"烟花","translateFrame":[{"duration":10,"tweenEasing":0,"y":421.44},{"duration":20}]}],"slot":[{"name":"烟花","displayFrame":[{"duration":12},{"duration":18,"value":-1}]},{"name":"1","displayFrame":[{"duration":12,"value":-1},{"duration":2},{"duration":2,"value":1},{"duration":2,"value":2},{"duration":2,"value":3},{"duration":2,"value":4},{"duration":2,"value":5},{"duration":2,"value":6},{"duration":2,"value":7},{"duration":2,"value":8},{"duration":0,"value":-1}]}]}],"defaultActions":[{"gotoAndPlay":"normal"}]}]}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "bce4f069-c7dc-4d7c-bdae-9528d291dc83",
"subMetas": {}
}
\ No newline at end of file
{"width":1024,"imagePath":"烟花_tex.png","height":1024,"name":"烟花","SubTexture":[{"width":152,"y":605,"height":97,"name":"烟花/烟花","x":323},{"width":167,"y":645,"height":65,"name":"烟花/1","x":1},{"width":267,"y":505,"height":98,"name":"烟花/4","x":323},{"width":456,"y":264,"height":239,"name":"烟花/7","x":528},{"width":193,"y":505,"height":54,"name":"烟花/2","x":592},{"width":493,"y":1,"height":261,"name":"烟花/8","x":528},{"width":409,"y":275,"height":211,"name":"烟花/6","x":1},{"width":320,"y":488,"height":155,"name":"烟花/5","x":1},{"width":525,"y":1,"height":272,"name":"烟花/9","x":1},{"width":203,"y":505,"height":33,"name":"烟花/3","x":787}]}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "6edbd32c-4733-466b-a910-5cf85b3eaef8",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "c138e5ff-6afa-4eef-8c24-7308cc6e2f7b",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1024,
"height": 1024,
"platformSettings": {},
"subMetas": {
"烟花_tex": {
"ver": "1.0.4",
"uuid": "91a38a51-4650-4bb3-89db-b1827ed75bf2",
"rawTextureUuid": "c138e5ff-6afa-4eef-8c24-7308cc6e2f7b",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -1,
"offsetY": 156.5,
"trimX": 1,
"trimY": 1,
"width": 1020,
"height": 709,
"rawWidth": 1024,
"rawHeight": 1024,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "1.2.9",
"uuid": "0737ce42-24f0-45c6-8e1a-8bdab4f74ba3",
"uuid": "074720a3-f261-4ae9-9af1-1adabd8f4c6d",
"asyncLoadAssets": false,
"autoReleaseAssets": true,
"subMetas": {}
......
This diff is collapsed.
{
"ver": "1.0.8",
"uuid": "f8b451ff-857c-4ca8-9870-866bc5154a29",
"uuid": "0e720e53-149d-4f8e-881b-dadb01d82383",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
......
export const defaultData = {
"maxWrongNumber": 4,
"startAudio": "http://staging-teach.cdn.ireadabc.com/17edcaecd09a72a64a77480673cdc232.mp3",
"endAudio": "http://staging-teach.cdn.ireadabc.com/fd8a2b8eeb4abbe7683d30e728ece184.mp3",
"question_arr": [
{
"question_audio_url": "",
"option_arr": [
{
"pic_url": "http://staging-teach.cdn.ireadabc.com/5ba43828aef85c585743a0c898b43c42.png",
"audio_url": "http://staging-teach.cdn.ireadabc.com/ce3337620f22232dd15c29c66af57736.mp3",
"is_right": true
},
{
"pic_url": "http://staging-teach.cdn.ireadabc.com/d69dee492fd35b3c066207c3fc8e3258.png",
"audio_url": "http://staging-teach.cdn.ireadabc.com/b4d95069fcc91976740461b9061a303a.mp3",
"is_right": false
},
{
"pic_url": "http://staging-teach.cdn.ireadabc.com/48ecba3519b1d58a1fa434ae694fc831.png",
"audio_url": "http://staging-teach.cdn.ireadabc.com/b4d95069fcc91976740461b9061a303a.mp3",
"is_right": false
},
{
"pic_url": "http://staging-teach.cdn.ireadabc.com/44464e706225cfe43e918bf1167a2ac1.png",
"audio_url": "http://staging-teach.cdn.ireadabc.com/e62f0e83bc744a6e508fa23aaa656792.mp3",
"is_right": false
},
{
"pic_url": "http://staging-teach.cdn.ireadabc.com/251667ae3d4921582392f6bc42bd2a96.png",
"audio_url": "http://staging-teach.cdn.ireadabc.com/f4e0925dec2f24505872b1c367343a6e.mp3",
"is_right": false
}
],
"audio_url": "http://staging-teach.cdn.ireadabc.com/e62f0e83bc744a6e508fa23aaa656792.mp3"
},
{
"question_audio_url": "",
"option_arr": [
{
"pic_url": "http://staging-teach.cdn.ireadabc.com/5ba43828aef85c585743a0c898b43c42.png",
"audio_url": "http://staging-teach.cdn.ireadabc.com/ce3337620f22232dd15c29c66af57736.mp3",
"is_right": true
},
{
"pic_url": "http://staging-teach.cdn.ireadabc.com/d69dee492fd35b3c066207c3fc8e3258.png",
"audio_url": "http://staging-teach.cdn.ireadabc.com/b4d95069fcc91976740461b9061a303a.mp3",
"is_right": false
},
{
"pic_url": "http://staging-teach.cdn.ireadabc.com/48ecba3519b1d58a1fa434ae694fc831.png",
"audio_url": "http://staging-teach.cdn.ireadabc.com/b4d95069fcc91976740461b9061a303a.mp3",
"is_right": false
},
{
"pic_url": "http://staging-teach.cdn.ireadabc.com/44464e706225cfe43e918bf1167a2ac1.png",
"audio_url": "http://staging-teach.cdn.ireadabc.com/e62f0e83bc744a6e508fa23aaa656792.mp3",
"is_right": false
},
{
"pic_url": "http://staging-teach.cdn.ireadabc.com/251667ae3d4921582392f6bc42bd2a96.png",
"audio_url": "http://staging-teach.cdn.ireadabc.com/f4e0925dec2f24505872b1c367343a6e.mp3",
"is_right": false
}
],
"audio_url": "http://staging-teach.cdn.ireadabc.com/e62f0e83bc744a6e508fa23aaa656792.mp3"
}]
}
\ No newline at end of file
......@@ -165,7 +165,7 @@ export function getSprNodeByUrl(url, cb) {
export function playAudio(audioClip, cb = null) {
if (audioClip) {
const audioId = cc.audioEngine.playEffect(audioClip, false);
const audioId = cc.audioEngine.playEffect(audioClip, false, 0.8);
if (cb) {
cc.audioEngine.setFinishCallback(audioId, () => {
cb();
......@@ -177,12 +177,9 @@ export function playAudio(audioClip, cb = null) {
export async function asyncDelay(time) {
return new Promise((resolve, reject) => {
try {
cc.tween(cc.find('Canvas'))
.delay(time)
.call(()=>{
resolve(null);
})
.start();
setTimeout(() => {
resolve();
}, time * 1000);
} catch (e) {
reject(e);
}
......@@ -299,7 +296,7 @@ export async function asyncTweenTo(node, duration, obj, ease = undefined) {
cc.tween(node)
.to(duration, obj, ease)
.call(() => {
resolve(null);
resolve();
})
.start();
} catch (e) {
......@@ -314,7 +311,7 @@ export async function asyncTweenBy(node, duration, obj, ease = undefined) {
cc.tween(node)
.by(duration, obj, ease)
.call(() => {
resolve(null);
resolve();
})
.start();
} catch (e) {
......@@ -355,3 +352,37 @@ export function onHomeworkFinish() {
console.log('onHomeworkFinish');
}
}
export async function asyncPlayDragonBoneAnimation(node, animationName, time = 1, onFrameEvent = null) {
return new Promise((resolve, reject) => {
const armatureDisplay = node.getComponent(dragonBones.ArmatureDisplay);
armatureDisplay.timeScale = 1;
armatureDisplay.once(dragonBones.EventObject.COMPLETE, () => {
resolve();
});
armatureDisplay.on(dragonBones.EventObject.FRAME_EVENT, (event) => {
if (onFrameEvent) {
onFrameEvent(event);
}
});
armatureDisplay.playAnimation(animationName, time);
});
}
export function playDragonBoneAnimation(node, animationName, time = 1, onFinish = null, onFrameEvent = null) {
const armatureDisplay = node.getComponent(dragonBones.ArmatureDisplay);
armatureDisplay.timeScale = 1;
armatureDisplay.once(dragonBones.EventObject.COMPLETE, () => {
if (onFinish) {
onFinish();
}
});
armatureDisplay.on(dragonBones.EventObject.FRAME_EVENT, (event) => {
if (onFrameEvent) {
onFrameEvent(event);
}
});
armatureDisplay.playAnimation(animationName, time);
}
{
"ver": "2.3.5",
"uuid": "6c8e488b-9cdf-4d20-89c5-4d432d8a2e23",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 2176,
"height": 1074,
"platformSettings": {},
"subMetas": {
"bg_bg": {
"ver": "1.0.4",
"uuid": "95074812-ffd9-4326-9008-60a88279bd2e",
"rawTextureUuid": "6c8e488b-9cdf-4d20-89c5-4d432d8a2e23",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 2176,
"height": 1074,
"rawWidth": 2176,
"rawHeight": 1074,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "e5d8b6de-dae4-4605-9f8f-8584b745b7f2",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1244,
"height": 792,
"platformSettings": {},
"subMetas": {
"bg_box_behind": {
"ver": "1.0.4",
"uuid": "83ae63f9-5160-4995-af20-110757bb4d21",
"rawTextureUuid": "e5d8b6de-dae4-4605-9f8f-8584b745b7f2",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 1,
"offsetY": 189.5,
"trimX": 2,
"trimY": 0,
"width": 1242,
"height": 413,
"rawWidth": 1244,
"rawHeight": 792,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "66f6b898-e326-4bab-89e3-78997d049e47",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1244,
"height": 792,
"platformSettings": {},
"subMetas": {
"bg_box_front": {
"ver": "1.0.4",
"uuid": "2b44a5d3-fe98-49c2-9099-8400d48c17c9",
"rawTextureUuid": "66f6b898-e326-4bab-89e3-78997d049e47",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -47,
"trimX": 0,
"trimY": 98,
"width": 1244,
"height": 690,
"rawWidth": 1244,
"rawHeight": 792,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "efa5fa09-a4dd-4bfc-ab7e-17c19f85408f",
"uuid": "40a7f7d6-3f30-46c7-b9e4-1d5fcfc0c648",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 366,
"height": 336,
"width": 409,
"height": 409,
"platformSettings": {},
"subMetas": {
"1orange": {
"bg_circle": {
"ver": "1.0.4",
"uuid": "43d1e79d-6de8-4dcb-b8ce-d767df7913aa",
"rawTextureUuid": "efa5fa09-a4dd-4bfc-ab7e-17c19f85408f",
"uuid": "75bb0910-bb15-4daf-9a6d-6873c400a148",
"rawTextureUuid": "40a7f7d6-3f30-46c7-b9e4-1d5fcfc0c648",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -0.5,
"offsetY": 0,
"trimX": 0,
"trimY": 1,
"width": 366,
"height": 335,
"rawWidth": 366,
"rawHeight": 336,
"trimY": 0,
"width": 409,
"height": 409,
"rawWidth": 409,
"rawHeight": 409,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
......
{
"ver": "2.3.5",
"uuid": "e5a3f41e-df6e-4314-9db7-0771939bb4d6",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 2176,
"height": 798,
"platformSettings": {},
"subMetas": {
"bg_deck": {
"ver": "1.0.4",
"uuid": "3d584bab-9dfe-4922-8dc7-821b4f063796",
"rawTextureUuid": "e5a3f41e-df6e-4314-9db7-0771939bb4d6",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 2176,
"height": 798,
"rawWidth": 2176,
"rawHeight": 798,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "e6d712f3-3bc6-4a7b-a140-9016e0628f67",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 209,
"height": 146,
"platformSettings": {},
"subMetas": {
"btn_next": {
"ver": "1.0.4",
"uuid": "e666ed9c-0ebf-4802-8d58-7473ddde1634",
"rawTextureUuid": "e6d712f3-3bc6-4a7b-a140-9016e0628f67",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 1,
"trimY": 1,
"width": 207,
"height": 144,
"rawWidth": 209,
"rawHeight": 146,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "87cc865a-7ac0-44b4-8919-3b01f815748f",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 262,
"height": 268,
"platformSettings": {},
"subMetas": {
"btn_replay": {
"ver": "1.0.4",
"uuid": "c2f5963d-2ed1-4add-91b8-f3c4ff0d893e",
"rawTextureUuid": "87cc865a-7ac0-44b4-8919-3b01f815748f",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 262,
"height": 268,
"rawWidth": 262,
"rawHeight": 268,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "18d07592-51a9-421e-8972-0f67b68d29e1",
"uuid": "552ce11c-0f7d-4146-8c78-23fc7cd917cb",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 144,
"height": 144,
"width": 171,
"height": 146,
"platformSettings": {},
"subMetas": {
"icon": {
"btn_return": {
"ver": "1.0.4",
"uuid": "6fbc30a8-3c49-44ae-8ba4-7f56f385b78a",
"rawTextureUuid": "18d07592-51a9-421e-8972-0f67b68d29e1",
"uuid": "70f3d2ee-ca1d-49fd-84dd-3cdc8164fba0",
"rawTextureUuid": "552ce11c-0f7d-4146-8c78-23fc7cd917cb",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -0.5,
"trimX": 3,
"trimY": 2,
"width": 138,
"height": 141,
"rawWidth": 144,
"rawHeight": 144,
"offsetY": 0,
"trimX": 1,
"trimY": 1,
"width": 169,
"height": 144,
"rawWidth": 171,
"rawHeight": 146,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
......
{
"ver": "2.3.5",
"uuid": "52a666fa-b2b9-41a0-8254-1ff8ef313a43",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 244,
"height": 232,
"platformSettings": {},
"subMetas": {
"btn_submit": {
"ver": "1.0.4",
"uuid": "b9d7ec09-fa5f-4f90-be2c-e8d035b0f74d",
"rawTextureUuid": "52a666fa-b2b9-41a0-8254-1ff8ef313a43",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 244,
"height": 232,
"rawWidth": 244,
"rawHeight": 232,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "77e39803-4b9e-4735-aad5-98a2054bca4d",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "e1b4d971-9876-4832-803a-5a321964a78b",
"uuid": "3c28c3e3-3241-4a69-a8cc-c69596312b21",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
......@@ -11,10 +11,10 @@
"height": 720,
"platformSettings": {},
"subMetas": {
"bg": {
"bg_bg": {
"ver": "1.0.4",
"uuid": "8288e3d4-4c75-4b27-8f01-f7014417f4dd",
"rawTextureUuid": "e1b4d971-9876-4832-803a-5a321964a78b",
"uuid": "97f1d65d-ea03-4276-acd5-7fc3ebbb125c",
"rawTextureUuid": "3c28c3e3-3241-4a69-a8cc-c69596312b21",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
......
{
"ver": "2.3.5",
"uuid": "8823c170-967d-416f-b65b-f297baa16bb2",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 386,
"height": 296,
"platformSettings": {},
"subMetas": {
"bg_box_behind": {
"ver": "1.0.4",
"uuid": "b793b0d3-fd30-4d34-8264-28821c329c1d",
"rawTextureUuid": "8823c170-967d-416f-b65b-f297baa16bb2",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 386,
"height": 296,
"rawWidth": 386,
"rawHeight": 296,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "964bbe0d-3431-4e1b-a704-db4a78fe0fac",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1280,
"height": 720,
"platformSettings": {},
"subMetas": {
"bg_box_front": {
"ver": "1.0.4",
"uuid": "33fc1308-9256-403d-a9fc-1567ef02f890",
"rawTextureUuid": "964bbe0d-3431-4e1b-a704-db4a78fe0fac",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -24,
"offsetY": -142.5,
"trimX": 223,
"trimY": 322,
"width": 786,
"height": 361,
"rawWidth": 1280,
"rawHeight": 720,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "cce12600-aa0b-43dd-a056-21100aeea8db",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1280,
"height": 181,
"platformSettings": {},
"subMetas": {
"bg_deck": {
"ver": "1.0.4",
"uuid": "a6e219f9-4946-4b9b-b638-6e160a0df435",
"rawTextureUuid": "cce12600-aa0b-43dd-a056-21100aeea8db",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1280,
"height": 181,
"rawWidth": 1280,
"rawHeight": 181,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "d582359e-924e-4ee9-9964-1fc4bb417e71",
"uuid": "17449abf-084e-4208-adbf-2d4aa25dbfc0",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 61,
"height": 67,
"width": 156,
"height": 349,
"platformSettings": {},
"subMetas": {
"btn_right": {
"bg_left": {
"ver": "1.0.4",
"uuid": "e5a2dbaa-a677-4a32-90d7-a1b057d7fb59",
"rawTextureUuid": "d582359e-924e-4ee9-9964-1fc4bb417e71",
"uuid": "3468d78d-e7e3-4876-b449-64423a774323",
"rawTextureUuid": "17449abf-084e-4208-adbf-2d4aa25dbfc0",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -0.5,
"offsetY": 0.5,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 60,
"height": 66,
"rawWidth": 61,
"rawHeight": 67,
"width": 156,
"height": 349,
"rawWidth": 156,
"rawHeight": 349,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
......
{
"ver": "2.3.5",
"uuid": "3ce8ae56-e8e5-4fd2-9660-2a74a4c039e8",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 304,
"height": 679,
"platformSettings": {},
"subMetas": {
"bg_right": {
"ver": "1.0.4",
"uuid": "e84554ff-b59e-49a7-a7cd-f573b0a828c2",
"rawTextureUuid": "3ce8ae56-e8e5-4fd2-9660-2a74a4c039e8",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 304,
"height": 679,
"rawWidth": 304,
"rawHeight": 679,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "9a79969a-0506-48d4-bc98-3c05d109b027",
"uuid": "ee21a24d-a03f-4280-8dd7-99ffa7531c19",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 61,
"height": 67,
"width": 1280,
"height": 79,
"platformSettings": {},
"subMetas": {
"btn_left": {
"bg_top": {
"ver": "1.0.4",
"uuid": "ce19457d-e8f3-4c38-ae3e-d4b99208ddb5",
"rawTextureUuid": "9a79969a-0506-48d4-bc98-3c05d109b027",
"uuid": "87675918-d434-4db9-8ce4-228f911d989e",
"rawTextureUuid": "ee21a24d-a03f-4280-8dd7-99ffa7531c19",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
......@@ -22,10 +22,10 @@
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 61,
"height": 67,
"rawWidth": 61,
"rawHeight": 67,
"width": 1280,
"height": 79,
"rawWidth": 1280,
"rawHeight": 79,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
......
{
"ver": "1.1.2",
"uuid": "c35bb2f6-f24a-4850-ae44-643f2fdc7541",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {
"ios": false,
"android": false
},
"subMetas": {}
}
\ No newline at end of file
import { asyncDelay, onHomeworkFinish } from "../script/util";
import { MyCocosSceneComponent } from "../script/MyCocosSceneComponent";
const { ccclass, property } = cc._decorator;
@ccclass
export default class SceneComponent extends MyCocosSceneComponent {
addPreloadImage() {
// TODO 根据自己的配置预加载图片资源
this._imageResList.push({ url: this.data.pic_url });
this._imageResList.push({ url: this.data.pic_url_2 });
}
addPreloadAudio() {
// TODO 根据自己的配置预加载音频资源
this._audioResList.push({ url: this.data.audio_url });
}
addPreloadAnima() {
}
onLoadEnd() {
// TODO 加载完成后的逻辑写在这里, 下面的代码仅供参考
this.initData();
this.initView();
this.initListener();
}
_cantouch = null;
initData() {
// 所有全局变量 默认都是null
this._cantouch = true;
}
initView() {
this.initBg();
this.initPic();
this.initBtn();
this.initIcon();
}
initBg() {
const bgNode = cc.find('Canvas/bg');
bgNode.scale = this._mapScaleMax;
}
pic1 = null;
pic2 = null;
initPic() {
const canvas = cc.find('Canvas');
const maxW = canvas.width * 0.7;
this.getSprNodeByUrl(this.data.pic_url, (sprNode) => {
const picNode1 = sprNode;
picNode1.scale = maxW / picNode1.width;
picNode1.baseX = picNode1.x;
canvas.addChild(picNode1);
this.pic1 = picNode1;
const labelNode = new cc.Node();
labelNode.color = cc.Color.YELLOW;
const label = labelNode.addComponent(cc.Label);
label.string = this.data.text;
label.fontSize = 60;
label.lineHeight = 60;
label.font = cc.find('Canvas/res/font/BRLNSDB').getComponent('cc.Label').font;
picNode1.addChild(labelNode);
});
this.getSprNodeByUrl(this.data.pic_url_2, (sprNode) => {
const picNode2 = sprNode;
picNode2.scale = maxW / picNode2.width;
canvas.addChild(picNode2);
picNode2.x = canvas.width;
picNode2.baseX = picNode2.x;
this.pic2 = picNode2;
const labelNode = new cc.Node();
const label = labelNode.addComponent(cc.RichText);
const size = 60
label.font = cc.find('Canvas/res/font/BRLNSDB').getComponent(cc.Label).font;
label.string = `<outline color=#751e00 width=4><size=${size}><color=#ffffff>${this.data.text}</color></size></outline>`
label.lineHeight = size;
picNode2.addChild(labelNode);
});
}
initIcon() {
const iconNode = this.getSprNode('icon');
iconNode.zIndex = 5;
iconNode.anchorX = 1;
iconNode.anchorY = 1;
iconNode.parent = cc.find('Canvas');
iconNode.x = iconNode.parent.width / 2 - 10;
iconNode.y = iconNode.parent.height / 2 - 10;
iconNode.on(cc.Node.EventType.TOUCH_START, () => {
this.playAudioByUrl(this.data.audio_url);
})
}
curPage = null;
initBtn() {
this.curPage = 0;
const bottomPart = cc.find('Canvas/bottomPart');
bottomPart.zIndex = 5; // 提高层级
bottomPart.x = bottomPart.parent.width / 2;
bottomPart.y = -bottomPart.parent.height / 2;
const leftBtnNode = bottomPart.getChildByName('btn_left');
//节点中添加了button组件 则可以添加click事件监听
leftBtnNode.on('click', () => {
if (!this._cantouch) {
return;
}
if (this.curPage == 0) {
return;
}
this.curPage = 0
this.leftMove();
this.playLocalAudio('btn');
})
const rightBtnNode = bottomPart.getChildByName('btn_right');
//节点中添加了button组件 则可以添加click事件监听
rightBtnNode.on('click', () => {
if (!this._cantouch) {
return;
}
if (this.curPage == 1) {
return;
}
this.curPage = 1
this.rightMove();
// 游戏结束时需要调用这个方法通知系统作业完成
onHomeworkFinish();
this.playLocalAudio('btn');
})
}
leftMove() {
this._cantouch = false;
const len = this.pic1.parent.width;
cc.tween(this.pic1)
.to(1, { x: this.pic1.baseX }, { easing: 'cubicInOut' })
.start();
cc.tween(this.pic2)
.to(1, { x: this.pic2.baseX }, { easing: 'cubicInOut' })
.call(() => {
this._cantouch = true;
})
.start();
}
rightMove() {
this._cantouch = false;
const len = this.pic1.parent.width;
cc.tween(this.pic1)
.to(1, { x: this.pic1.baseX - len }, { easing: 'cubicInOut' })
.start();
cc.tween(this.pic2)
.to(1, { x: this.pic2.baseX - len }, { easing: 'cubicInOut' })
.call(() => {
this._cantouch = true;
})
.start();
}
// update (dt) {},
initListener() {
}
playLocalAudio(audioName) {
const audio = cc.find(`Canvas/res/audio/${audioName}`).getComponent(cc.AudioSource);
return new Promise((resolve, reject) => {
const id = cc.audioEngine.playEffect(audio.clip, false);
cc.audioEngine.setFinishCallback(id, () => {
resolve(id);
});
})
}
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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