Commit 548bdb21 authored by Tt's avatar Tt

提交内容

parent 5b3d11a5
{"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 "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
This diff is collapsed.
...@@ -491,7 +491,7 @@ cc.Class({ ...@@ -491,7 +491,7 @@ cc.Class({
pg.view.visible(btn_record, false); pg.view.visible(btn_record, false);
console.log('this.resultArr: ', JSON.stringify(this.resultArr)); console.log('this.resultArr: ', JSON.stringify(this.resultArr));
onHomeworkFinish && onHomeworkFinish({result: this.resultArr}); onHomeworkFinish && onHomeworkFinish({ result: this.resultArr });
}, },
playPartAni() { playPartAni() {
...@@ -619,41 +619,87 @@ cc.Class({ ...@@ -619,41 +619,87 @@ cc.Class({
wordAni(item, content) { wordAni(item, content) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
item.active = true; if (this._stageData.isLast) {
let itemfirst = pg.view.find(item, "first"); item.active = true;
//动态居中算法。 let itemfirst = pg.view.find(item, "last");
//锚点在中间,左右延长,第一个字不去显示 let itemOther = pg.view.find(item, "first");
let contentArr = content.split(""); itemfirst.active = true;
let s0 = contentArr.shift(); itemOther.active = false;
let s1 = contentArr.join(""); //动态居中算法。
//首字母变大 //锚点在中间,左右延长,第一个字不去显示
let count = 100; let contentArr = content.split("");
let max = 150; let s0 = contentArr.pop();
let str1 = `<size=${max}><color=#ffffff>${s0}</color></size><size=${count}><color=#0000>${s1}</color></size>` let s1 = contentArr.join("");
let strfirst1 = `<size=${max}><color=#fc4a4a>${s0}</color></size>`; //首字母变大
item.getComponent(cc.RichText).string = str1; let count = 80;
itemfirst.y = 17; let max = 120;
itemfirst.getComponent(cc.RichText).string = strfirst1; let str1 = `<size=${count}><color=#0000>${s1}</color></size>` + `<size=${max}><color=#ffffff>${s0}</color></size>`
let strfirst1 = `<size=${max}><color=#fc4a4a>${s0}</color></size>`;
item.getComponent(cc.RichText).string = str1;
itemfirst.y = 17;
itemfirst.getComponent(cc.RichText).string = strfirst1;
this._timeoutIds.push(setTimeout(() => { this._timeoutIds.push(setTimeout(() => {
let times = 20; let times = 20;
let time = 0; let time = 0;
let inter = setInterval(() => { let inter = setInterval(() => {
time++; time++;
let nowCount = count + (max - count) * (time / times); let nowCount = count + (max - count) * (time / times);
if (nowCount >= 150) { if (nowCount >= 120) {
nowCount = 150; nowCount = 120;
clearInterval(inter); clearInterval(inter);
} }
let str2 = `<size=${max}><color=#ffffff>${s0}</color></size><size=${nowCount}><color=#0000>${s1}</color></size>` let str2 = `<size=${nowCount}><color=#0000>${s1}</color></size>` + `<size=${max}><color=#ffffff>${s0}</color></size>`
itemfirst.y = 0; itemfirst.y = 0;
item.getComponent(cc.RichText).string = str2; item.getComponent(cc.RichText).string = str2;
}, 30); }, 30);
this._intervalIds.push(inter); this._intervalIds.push(inter);
setTimeout(() => { setTimeout(() => {
resolve(''); resolve('');
}, 1200); }, 1200);
}, 4100)); }, 4100));
} else {
item.active = true;
let itemfirst = pg.view.find(item, "first");
let itemOther = pg.view.find(item, "last");
itemfirst.active = true;
itemOther.active = false;
//动态居中算法。
//锚点在中间,左右延长,第一个字不去显示
let contentArr = content.split("");
let s0 = contentArr.shift();
let s1 = contentArr.join("");
//首字母变大
let count = 80;
let max = 120;
let str1 = `<size=${max}><color=#ffffff>${s0}</color></size><size=${count}><color=#0000>${s1}</color></size>`
let strfirst1 = `<size=${max}><color=#fc4a4a>${s0}</color></size>`;
item.getComponent(cc.RichText).string = str1;
itemfirst.y = 17;
itemfirst.getComponent(cc.RichText).string = strfirst1;
this._timeoutIds.push(setTimeout(() => {
let times = 20;
let time = 0;
let inter = setInterval(() => {
time++;
let nowCount = count + (max - count) * (time / times);
if (nowCount >= 120) {
nowCount = 120;
clearInterval(inter);
}
let str2 = `<size=${max}><color=#ffffff>${s0}</color></size><size=${nowCount}><color=#0000>${s1}</color></size>`
itemfirst.y = 0;
item.getComponent(cc.RichText).string = str2;
}, 30);
this._intervalIds.push(inter);
setTimeout(() => {
resolve('');
}, 1200);
}, 4100));
}
}); });
}, },
...@@ -773,7 +819,7 @@ cc.Class({ ...@@ -773,7 +819,7 @@ cc.Class({
console.log(' in pushResultData'); console.log(' in pushResultData');
const word = this._stageData.word; const word = this._stageData.word;
const score = this._stageData.curScore; const score = this._stageData.curScore;
this.resultArr.push( {word, score} ); this.resultArr.push({ word, score });
}, },
......
...@@ -35,6 +35,7 @@ class GameManager { ...@@ -35,6 +35,7 @@ class GameManager {
obj.word = ar.title; obj.word = ar.title;
obj.sound = ar.wordAudio; obj.sound = ar.wordAudio;
obj.img = ar.bgImg; obj.img = ar.bgImg;
obj.isLast = ar.isLast || false;
obj.cartoonSke = ar.imgAni.ske.url; obj.cartoonSke = ar.imgAni.ske.url;
obj.cartoonTex = ar.imgAni.tex.url; obj.cartoonTex = ar.imgAni.tex.url;
obj.cartoonPng = ar.imgAni.png.url; obj.cartoonPng = ar.imgAni.png.url;
......
...@@ -13,11 +13,11 @@ export const defaultData = { ...@@ -13,11 +13,11 @@ export const defaultData = {
}, },
"list": [ "list": [
{ {
"title": "apple", "bgImg": "http://staging-teach.cdn.ireadabc.com/97e19da9309e4e5aafca5ea2e9db8f46.png", "wordAudio": "http://staging-teach.cdn.ireadabc.com/ab3538f7d4d57ac1abd740bd32f06b2d.mp3", "imgAni": { "ske": { "url": "http://staging-teach.cdn.ireadabc.com/c81816bbb714b22c57267ac5150ee1fe.json", "name": "apple_ske.json" }, "tex": { "url": "http://staging-teach.cdn.ireadabc.com/6088eec0273bc0488d5f66dfb63c1003.json", "name": "apple_tex.json" }, "png": { "url": "http://staging-teach.cdn.ireadabc.com/a51151d68bd74d430e2e586d86c6ddd3.png", "name": "apple_tex.png" } } "isLast": true, "title": "apple", "bgImg": "http://staging-teach.cdn.ireadabc.com/97e19da9309e4e5aafca5ea2e9db8f46.png", "wordAudio": "http://staging-teach.cdn.ireadabc.com/ab3538f7d4d57ac1abd740bd32f06b2d.mp3", "imgAni": { "ske": { "url": "http://staging-teach.cdn.ireadabc.com/c81816bbb714b22c57267ac5150ee1fe.json", "name": "apple_ske.json" }, "tex": { "url": "http://staging-teach.cdn.ireadabc.com/6088eec0273bc0488d5f66dfb63c1003.json", "name": "apple_tex.json" }, "png": { "url": "http://staging-teach.cdn.ireadabc.com/a51151d68bd74d430e2e586d86c6ddd3.png", "name": "apple_tex.png" } }
}, { }, {
"title": "ant", "bgImg": "http://staging-teach.cdn.ireadabc.com/0600790c4336c3839d90756aca5da45e.png", "wordAudio": "http://staging-teach.cdn.ireadabc.com/ab3538f7d4d57ac1abd740bd32f06b2d.mp3", "imgAni": { "ske": { "url": "http://staging-teach.cdn.ireadabc.com/dd4ede22a761f1f8ec261c93a5306f5c.json", "name": "ant_ske.json" }, "tex": { "url": "http://staging-teach.cdn.ireadabc.com/56078bcdcc7116843a56ecc4c23d3665.json", "name": "ant_tex.json" }, "png": { "url": "http://staging-teach.cdn.ireadabc.com/1a0c95cab05487b003a8dec9dd151ba4.png", "name": "ant_tex.png" } } "isLast": false, "title": "ant", "bgImg": "http://staging-teach.cdn.ireadabc.com/0600790c4336c3839d90756aca5da45e.png", "wordAudio": "http://staging-teach.cdn.ireadabc.com/ab3538f7d4d57ac1abd740bd32f06b2d.mp3", "imgAni": { "ske": { "url": "http://staging-teach.cdn.ireadabc.com/dd4ede22a761f1f8ec261c93a5306f5c.json", "name": "ant_ske.json" }, "tex": { "url": "http://staging-teach.cdn.ireadabc.com/56078bcdcc7116843a56ecc4c23d3665.json", "name": "ant_tex.json" }, "png": { "url": "http://staging-teach.cdn.ireadabc.com/1a0c95cab05487b003a8dec9dd151ba4.png", "name": "ant_tex.png" } }
}, { }, {
"title": "allaign", "bgImg": "http://staging-teach.cdn.ireadabc.com/97e19da9309e4e5aafca5ea2e9db8f46.png", "wordAudio": "http://staging-teach.cdn.ireadabc.com/ab3538f7d4d57ac1abd740bd32f06b2d.mp3", "imgAni": { "ske": { "url": "http://staging-teach.cdn.ireadabc.com/cf0fd816076652f64cc992c084248a80.json", "name": "alligator_ske.json" }, "tex": { "url": "http://staging-teach.cdn.ireadabc.com/5ece588b347d8fbe05eba19a40c985f0.json", "name": "alligator_tex.json" }, "png": { "url": "http://staging-teach.cdn.ireadabc.com/a84eff5545eca41f3e997ea8a53ac66f.png", "name": "alligator_tex.png" } } "isLast": false, "title": "allaign", "bgImg": "http://staging-teach.cdn.ireadabc.com/97e19da9309e4e5aafca5ea2e9db8f46.png", "wordAudio": "http://staging-teach.cdn.ireadabc.com/ab3538f7d4d57ac1abd740bd32f06b2d.mp3", "imgAni": { "ske": { "url": "http://staging-teach.cdn.ireadabc.com/cf0fd816076652f64cc992c084248a80.json", "name": "alligator_ske.json" }, "tex": { "url": "http://staging-teach.cdn.ireadabc.com/5ece588b347d8fbe05eba19a40c985f0.json", "name": "alligator_tex.json" }, "png": { "url": "http://staging-teach.cdn.ireadabc.com/a84eff5545eca41f3e997ea8a53ac66f.png", "name": "alligator_tex.png" } }
}] }]
} }
} }
......
This diff is collapsed.
...@@ -92,6 +92,7 @@ ...@@ -92,6 +92,7 @@
<input style="width: 80%; margin-bottom: 0.5vw" type="text" nz-input placeholder="" [(ngModel)]="item.title" <input style="width: 80%; margin-bottom: 0.5vw" type="text" nz-input placeholder="" [(ngModel)]="item.title"
(blur)="saveItem()"> (blur)="saveItem()">
<label nz-checkbox [(ngModel)]="item.isLast" (ngModelChange)="saveItem()">尾字母变红</label>
<div> <div>
<app-upload-dragon-bone style="width: 100%" (save)="onDragonBoneSave($event,item)" <app-upload-dragon-bone style="width: 100%" (save)="onDragonBoneSave($event,item)"
......
...@@ -91,6 +91,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy { ...@@ -91,6 +91,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
} }
function Item() { function Item() {
this.isLast = false;
this.title = ""; this.title = "";
this.bgImg = ""; this.bgImg = "";
this.wordAudio = ""; this.wordAudio = "";
......
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