Commit e190ed8a authored by Tt's avatar Tt

1

parent 26d85fed
......@@ -740,11 +740,17 @@ cc.Class({
},
async playCardAudio() {
return new Promise(async (resolve, reject) => {
let orderAudio = this._stageData.orderAudio;
let orderAudio = this._stageData.titleGroup;
for (let i = 0; i < orderAudio.length; i++) {
await pg.audio.playAudioByUrl(orderAudio[i], (id) => {
let t = orderAudio[i];
await pg.audio.playAudioByUrl(t.audio, (id) => {
let time = cc.audioEngine.getDuration(id);
this.showCardAction(i, time);
for (let j = 0; j < t.index.length; j++) {
if (t.index[j] && t.index[j] == 1) {
console.log("id: " + j + " i:" + i);
this.showCardAction(j, time);
}
}
})
}
let layout_short = cc.find("card_group/layout_short", this.node);
......@@ -763,9 +769,8 @@ cc.Class({
let layout = this._stageData.word.length <= 5 ? layout_short : layout_long;
let t = time / 2;
if (t < 0.1) t += 0.2;
layout.children.forEach((item) => {
if (!item.data) return;
if (id != item.data.order) return;
layout.children.forEach((item,idx) => {
if (idx != id) return;
cc.tween(item).by(t, { y: 20 }).by(t, { y: -20 }).start();
})
},
......
......@@ -35,6 +35,7 @@ class GameManager {
obj.word = ar.titleObj;
obj.sound = ar.wordAudio;
obj.orderAudio = ar.orderAudio;
obj.titleGroup = ar.titleGroup;
obj.img = ar.bgImg;
obj.cartoonSke = ar.imgAni.ske.url;
obj.cartoonTex = ar.imgAni.tex.url;
......
......@@ -14,9 +14,8 @@ export const defaultData = {
},
"list": [
{
"title": "AnUmbrellaAA",
"title": "tape",
"titleRed": [
1,
null,
1,
null,
......@@ -24,119 +23,23 @@ export const defaultData = {
],
"titleGroupUseWord": [
[
null,
1,
1,
1,
1,
1,
1,
1
],
[
1,
0,
1,
1,
1,
1,
1,
1
],
[
1,
1,
null,
1,
1,
1,
1,
1
],
[
1,
1,
1,
null,
1,
1,
1,
1
],
[
1,
1,
1,
1,
null,
1,
1,
1
],
[
1,
1,
1,
1,
1,
null,
1,
1
],
[
1,
1,
1,
1,
1,
1,
null,
1
],
[
1,
1,
1,
1,
1,
1,
1
],
[
1,
1,
1,
1,
1,
1,
1,
1
],
[
1,
1,
1,
1,
1,
1,
1,
1
],
[
1,
1,
1,
1,
1,
1,
1,
1
],
[
1,
1,
1,
1,
1,
1,
1,
......@@ -146,150 +49,48 @@ export const defaultData = {
"titleGroup": [
{
"index": [
1,
0
],
"audio": "https://staging-teach.cdn.ireadabc.com/f0578961665dbdb83c61e0be64711d23.mp3"
},
{
"index": [
null,
1
],
"audio": "https://staging-teach.cdn.ireadabc.com/c19a36db84b60ad5dc30df8b32d5dd96.mp3"
"audio": "http://staging-teach.cdn.ireadabc.com/f6872d4060663e733c9774929b2eeb21.mp3"
},
{
"index": [
null,
1,
null,
1
],
"audio": "https://staging-teach.cdn.ireadabc.com/b0d4670315235e5b94ff40de00b6779e.mp3"
},
{
"index": [
null,
null,
null,
1
],
"audio": "https://staging-teach.cdn.ireadabc.com/a335249581878901140a9ea0395a7201.mp3"
},
{
"index": [
null,
null,
null,
null,
1
],
"audio": "https://staging-teach.cdn.ireadabc.com/e110cc72cee01e543c69ceb2e94f086e.mp3"
},
{
"index": [
null,
null,
null,
null,
null,
1
],
"audio": "https://staging-teach.cdn.ireadabc.com/d07009f1e3878276c6df644faac159d5.mp3"
},
{
"index": [
null,
null,
null,
null,
null,
null,
1
],
"audio": "https://staging-teach.cdn.ireadabc.com/5aaeebe0e5c92dbc8df654f19498e165.mp3"
"audio": "http://staging-teach.cdn.ireadabc.com/5f5d6834729bb822158a4c9a70cc955d.mp3"
},
{
"index": [
null,
null,
null,
null,
null,
null,
null,
1
],
"audio": "https://staging-teach.cdn.ireadabc.com/55cb0029f93ab5310a5441ccb8004678.mp3"
},
{
"index": [],
"audio": "https://staging-teach.cdn.ireadabc.com/f0578961665dbdb83c61e0be64711d23.mp3"
},
{
"index": [],
"audio": "https://staging-teach.cdn.ireadabc.com/f0578961665dbdb83c61e0be64711d23.mp3"
"audio": "http://staging-teach.cdn.ireadabc.com/0913981cdeb2c6bc785de1054e80a500.mp3"
}
],
"titleObj": [
{
"card": "A",
"color": 0,
"order": 0
},
{
"card": "n",
"color": 1,
"order": 1
},
{
"card": "U",
"color": 0,
"order": 2
},
{
"card": "m",
"card": "t",
"color": 1,
"order": 3
"order": 0
},
{
"card": "b",
"card": "a",
"color": 0,
"order": 4
"order": 1
},
{
"card": "r",
"card": "p",
"color": 1,
"order": 5
"order": 1
},
{
"card": "e",
"color": 1,
"order": 6
},
{
"card": "l",
"color": 1,
"order": 7
},
{
"card": "l",
"color": 1,
"order": -1
},
{
"card": "a",
"color": 1,
"order": -1
},
{
"card": "A",
"color": 1,
"order": -1
},
{
"card": "A",
"color": 1,
"order": -1
"color": 0,
"order": 1
}
],
"bgImg": "https://staging-teach.cdn.ireadabc.com/2d2e57ba2d66e67aec41fa6ca5cf9f4c.png",
......@@ -309,15 +110,8 @@ export const defaultData = {
}
},
"orderAudio": [
"https://staging-teach.cdn.ireadabc.com/f0578961665dbdb83c61e0be64711d23.mp3",
"https://staging-teach.cdn.ireadabc.com/c19a36db84b60ad5dc30df8b32d5dd96.mp3",
"https://staging-teach.cdn.ireadabc.com/b0d4670315235e5b94ff40de00b6779e.mp3",
"https://staging-teach.cdn.ireadabc.com/a335249581878901140a9ea0395a7201.mp3",
"https://staging-teach.cdn.ireadabc.com/e110cc72cee01e543c69ceb2e94f086e.mp3",
"http://staging-teach.cdn.ireadabc.com/f6872d4060663e733c9774929b2eeb21.mp3",
"https://staging-teach.cdn.ireadabc.com/d07009f1e3878276c6df644faac159d5.mp3",
"https://staging-teach.cdn.ireadabc.com/5aaeebe0e5c92dbc8df654f19498e165.mp3",
"https://staging-teach.cdn.ireadabc.com/55cb0029f93ab5310a5441ccb8004678.mp3",
"https://staging-teach.cdn.ireadabc.com/f0578961665dbdb83c61e0be64711d23.mp3",
"https://staging-teach.cdn.ireadabc.com/f0578961665dbdb83c61e0be64711d23.mp3"
]
},
......@@ -615,18 +409,9 @@ export const defaultData = {
"bgImg": "https://staging-teach.cdn.ireadabc.com/0d9156d3c45f56e853c4000dbce92302.png",
"wordAudio": "https://staging-teach.cdn.ireadabc.com/ce3337620f22232dd15c29c66af57736.mp3",
"imgAni": {
"ske": {
"url": "https://staging-teach.cdn.ireadabc.com/82b32eeb43439a6d666bdf4b79f6374c.json",
"name": "banana_ske.json"
},
"tex": {
"url": "https://staging-teach.cdn.ireadabc.com/b430f8389fcf7535191244a3aae95ec1.json",
"name": "banana_tex.json"
},
"png": {
"url": "https://staging-teach.cdn.ireadabc.com/2d2e57ba2d66e67aec41fa6ca5cf9f4c.png",
"name": "banana_tex.png"
}
"ske": {},
"tex": {},
"png": {}
},
"orderAudio": [
"https://staging-teach.cdn.ireadabc.com/f0578961665dbdb83c61e0be64711d23.mp3",
......
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