Commit d40f6845 authored by 李维's avatar 李维

Dev done

parent e4ce7880
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
<h3> 泡泡: </h3> <h3> 泡泡: </h3>
<div *ngFor="let it of item.picArr; let i = index" style="padding: 10px; border: 1px solid #ccc; border-radius: 10px; width: 520px; margin-bottom: 20px"> <div *ngFor="let it of item.picArr; let i = index" style="padding: 10px; border: 1px solid #ccc; border-radius: 10px; width: 520px; margin-bottom: 20px">
<div style=" display: flex; align-items: center;"> <div style=" display: flex; align-items: center;">
<div style="width: 200px; margin-right: 10px; display: flex; justify-content: center; flex-direction: column"> <div style="width: 200px; margin-right: 10px; display: flex; justify-content: center; flex-direction: column">
<h4>组-{{i+1}}: </h4> <h4>组-{{i+1}}: </h4>
...@@ -18,6 +17,7 @@ ...@@ -18,6 +17,7 @@
[audioUrl]="it.audio_url" [audioUrl]="it.audio_url"
(audioUploaded)="onAudioUploadSuccess($event, 'audio_url', it)" (audioUploaded)="onAudioUploadSuccess($event, 'audio_url', it)"
></app-audio-recorder> ></app-audio-recorder>
<label nz-checkbox (ngModelChange)="checkBoxChange($event, 'showText', it)" [ngModel]="it.showText">显示文字</label>
<button style="width: 150px; margin-top: 5px" nz-button nzType="danger" (click)="deletePic(i)"> <button style="width: 150px; margin-top: 5px" nz-button nzType="danger" (click)="deletePic(i)">
删除 删除
</button> </button>
......
...@@ -88,7 +88,10 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy { ...@@ -88,7 +88,10 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
this.save(); this.save();
} }
checkBoxChange(value, key, it=this) {
it[key] = value;
this.save()
}
addPic() { addPic() {
console.log(' in add Pic'); console.log(' in add Pic');
...@@ -99,7 +102,8 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy { ...@@ -99,7 +102,8 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
{ {
text: '', text: '',
audio_url: '', audio_url: '',
pic_url: '' pic_url: '',
showText: false
} }
) )
......
...@@ -307,8 +307,6 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -307,8 +307,6 @@ export class PlayComponent implements OnInit, OnDestroy {
} }
} }
loadResources() { loadResources() {
const pr = []; const pr = [];
this.rawImages.forEach((value, key) => {// 预加载图片 this.rawImages.forEach((value, key) => {// 预加载图片
...@@ -656,15 +654,14 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -656,15 +654,14 @@ export class PlayComponent implements OnInit, OnDestroy {
this.renderArr.push(bgRight); this.renderArr.push(bgRight);
const letterBg = createSprite('letter_bg'); const letterBg = createSprite('letter_bg');
letterBg.x = 11.8 ; letterBg.x = 19;
letterBg.y = -0.8 ; letterBg.y = 1;
letterBg.setScaleXY(1.02) letterBg.setScaleXY(1.02)
bgRight.addChild(letterBg, -1); bgRight.addChild(letterBg, -1);
this.letterBg = letterBg; this.letterBg = letterBg;
letterBg['baseX'] = letterBg.x; letterBg['baseX'] = letterBg.x;
letterBg['baseY'] = letterBg.y; letterBg['baseY'] = letterBg.y;
const maskSpr = createSprite('letter_bg'); const maskSpr = createSprite('letter_bg');
// maskSpr.y = 200; // maskSpr.y = 200;
letterBg.setMaskSpr(maskSpr); letterBg.setMaskSpr(maskSpr);
...@@ -749,21 +746,22 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -749,21 +746,22 @@ export class PlayComponent implements OnInit, OnDestroy {
bgColor.x = 0; bgColor.x = 0;
bubble.addChild(bgColor, -2); bubble.addChild(bgColor, -2);
const bgText = createSprite('bg_worddi'); if(picArr[i].showText) {
bgText.y = - 8.5; const bgText = createSprite('bg_worddi');
bgText.x = 0; bgText.y = - 8.5;
bubble.addChild(bgText, 99); bgText.x = 0;
bubble.addChild(bgText, 99);
const label = new Label()
label.text = picArr[i].text; const label = new Label()
// label.setMaxSize(len * 0.9); label.text = picArr[i].text;
label.textAlign = 'center'; // label.setMaxSize(len * 0.9);
label.fontName = 'MMTextBook-Bold'; label.textAlign = 'center';
label.fontSize = 32; label.fontName = 'MMTextBook-Bold';
label.fontColor = '#893329'; label.fontSize = 32;
label.y = 55; label.fontColor = '#893329';
bgText.addChild(label, 100); label.y = 55;
// grid['label'] = label; bgText.addChild(label, 100);
}
const stone = createSprite('stone'); const stone = createSprite('stone');
stone.setScaleXY(this.mapScale); stone.setScaleXY(this.mapScale);
...@@ -828,7 +826,7 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -828,7 +826,7 @@ export class PlayComponent implements OnInit, OnDestroy {
const len = 48; const len = 48;
const dis = 6; const dis = 6;
const baseX = -(len * 10 + dis * 9) / 2 + len / 2; const baseX = -(len * 10 + dis * 9) / 2 + len / 2 - 15;
let baseY = -(len * 10 + dis * 9) / 2 + len / 2 + 5; let baseY = -(len * 10 + dis * 9) / 2 + len / 2 + 5;
const grid = this.data.grid; const grid = this.data.grid;
......
src/assets/play/bg_container_1.png

101 KB | W: | H:

src/assets/play/bg_container_1.png

71.6 KB | W: | H:

src/assets/play/bg_container_1.png
src/assets/play/bg_container_1.png
src/assets/play/bg_container_1.png
src/assets/play/bg_container_1.png
  • 2-up
  • Swipe
  • Onion skin
src/assets/play/bg_di.png

292 KB | W: | H:

src/assets/play/bg_di.png

234 KB | W: | H:

src/assets/play/bg_di.png
src/assets/play/bg_di.png
src/assets/play/bg_di.png
src/assets/play/bg_di.png
  • 2-up
  • Swipe
  • Onion skin
src/assets/play/bg_didoor.png

220 KB | W: | H:

src/assets/play/bg_didoor.png

13.7 KB | W: | H:

src/assets/play/bg_didoor.png
src/assets/play/bg_didoor.png
src/assets/play/bg_didoor.png
src/assets/play/bg_didoor.png
  • 2-up
  • Swipe
  • Onion skin
src/assets/play/bg_dikuang.png

60.1 KB | W: | H:

src/assets/play/bg_dikuang.png

71.6 KB | W: | H:

src/assets/play/bg_dikuang.png
src/assets/play/bg_dikuang.png
src/assets/play/bg_dikuang.png
src/assets/play/bg_dikuang.png
  • 2-up
  • Swipe
  • Onion skin
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