Commit d03c5c03 authored by 范雪寒's avatar 范雪寒

feat: 素材替换

parent dc097efb
This diff is collapsed.
......@@ -27,9 +27,10 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
this.themeArr = [];
this.themeArr.push({ code: '1', name: '主题1' });
this.themeArr.push({ code: '2', name: '主题2' });
this.themeArr.push({ code: '1', name: 'L1' });
this.themeArr.push({ code: '2', name: 'L2' });
this.themeArr.push({ code: '3', name: 'L3' });
this.themeArr.push({ code: '4', name: 'L4' });
this.item = {};
......
......@@ -283,10 +283,10 @@ export class Mission extends Item {
const stageBgPic = new MySprite();
stageBgPic.init(this.images.get(theme + "stage_bg"));
stageBgPic.scaleX = this.scaleX;
stageBgPic.scaleX = this.scaleX * 2;
stageBgPic.scaleY = this.scaleY;
stageBgPic.alpha = 0;
stageBgPic.x = this.width - stageBgPic.getBoundingBox().width / 2 - 25 * this.scaleX;
stageBgPic.x = this.width - stageBgPic.getBoundingBox().width / 2 + 5 * this.scaleX;
stageBgPic.y = this.height - stageBgPic.getBoundingBox().height / 2 + 2 * this.scaleY;
this.stageBgPic = stageBgPic;
bg.addChild(stageBgPic);
......@@ -297,7 +297,7 @@ export class Mission extends Item {
missionPic.scaleY = this.scaleY;
missionPic.x = missionPic.getBoundingBox().width / 2 - 3 * this.scaleX;
missionPic.y = this.height / 2;
bg.addChild(missionPic);
bg.addChild(missionPic);
const stageVal = new Label();
stageVal.text = "";
......@@ -308,7 +308,7 @@ export class Mission extends Item {
stageVal.scaleX = this.scaleX;
stageVal.scaleY = this.scaleY;
stageVal.refreshSize();
stageVal.x = missionPic.getBoundingBox().width;
stageVal.x = missionPic.getBoundingBox().width - 12 * this.scaleX;
stageVal.y = 20 * this.scaleY + stageVal.getBoundingBox().height / 2;
stageVal.alpha = 0;
......
......@@ -331,7 +331,7 @@ export class PlayComponent implements OnInit, OnDestroy {
return new Promise((resolve, reject) => {
const audio = new Audio();
audio.oncanplay = (a) => {
resolve();
resolve(null);
};
audio.onerror = () => {
reject();
......@@ -550,35 +550,35 @@ export class PlayComponent implements OnInit, OnDestroy {
l_middle_1.setScaleXY(this.mapScale);
l_middle_1.x = l_middle_1.getBoundingBox().width / 2 - 25 * this.mapScale;
l_middle_1.y = 10 * this.mapScale + l_middle_1.getBoundingBox().height / 2;
this.renderArr.push(l_middle_1);
// this.renderArr.push(l_middle_1);
const l_middle_2 = new MySprite();
l_middle_2.init(this.images.get(this.theme + "l_middle_2"));
l_middle_2.setScaleXY(this.mapScale);
l_middle_2.x = l_middle_1.getBoundingBox().width / 2 - 30 * this.mapScale;
l_middle_2.y = 300 * this.mapScale + l_middle_2.getBoundingBox().height / 2;;
this.renderArr.push(l_middle_2);
// this.renderArr.push(l_middle_2);
const pencil = new MySprite();
pencil.init(this.images.get(this.theme + "pencil"));
pencil.setScaleXY(this.mapScale);
pencil.x = pencil.getBoundingBox().width / 2 - 55 * this.mapScale;
pencil.y = this.canvasHeight - pencil.getBoundingBox().height / 2;
this.renderArr.push(pencil);
// this.renderArr.push(pencil);
const r_middle = new MySprite();
r_middle.init(this.images.get(this.theme + "r_middle"));
r_middle.setScaleXY(this.mapScale);
r_middle.x = this.canvasWidth - r_middle.getBoundingBox().width / 2 + 78 * this.mapScale;
r_middle.y = this.canvasHeight / 2 - 40 * this.mapScale;
this.renderArr.push(r_middle);
// this.renderArr.push(r_middle);
const r_bottom = new MySprite();
r_bottom.init(this.images.get(this.theme + "r_bottom"));
r_bottom.setScaleXY(this.mapScale);
r_bottom.x = this.canvasWidth - r_bottom.getBoundingBox().width / 2 + 30 * this.mapScale;
r_bottom.y = this.canvasHeight - r_bottom.getBoundingBox().height / 2;
this.renderArr.push(r_bottom);
// this.renderArr.push(r_bottom);
}
initStage() {
......
......@@ -31,6 +31,38 @@ const res = [
['2_r_middle', "assets/play/theme/2/r_middle.png"],
['2_box', "assets/play/theme/2/box.png"],
['2_title_rope', "assets/play/theme/2/title_rope.png"],
['3_bg', "assets/play/theme/3/bg.png"],
['3_bg2', "assets/play/theme/3/bg2.png"],
['3_btn_left', "assets/play/theme/3/btn_left.png"],
['3_btn_right', "assets/play/theme/3/btn_right.png"],
['3_e-mission', "assets/play/theme/3/e-mission.png"],
['3_pic_bg', "assets/play/theme/3/pic_bg.png"],
['3_stage_bg', "assets/play/theme/3/stage_bg.png"],
['3_title_bg', "assets/play/theme/3/title_bg.png"],
['3_l_middle_1', "assets/play/theme/3/l_middle_1.png"],
['3_l_middle_2', "assets/play/theme/3/l_middle_2.png"],
['3_pencil', "assets/play/theme/3/pencil.png"],
['3_r_bottom', "assets/play/theme/3/r_bottom.png"],
['3_r_middle', "assets/play/theme/3/r_middle.png"],
['3_box', "assets/play/theme/3/box.png"],
['3_title_rope', "assets/play/theme/3/title_rope.png"],
['4_bg', "assets/play/theme/4/bg.png"],
['4_bg2', "assets/play/theme/4/bg2.png"],
['4_btn_left', "assets/play/theme/4/btn_left.png"],
['4_btn_right', "assets/play/theme/4/btn_right.png"],
['4_e-mission', "assets/play/theme/4/e-mission.png"],
['4_pic_bg', "assets/play/theme/4/pic_bg.png"],
['4_stage_bg', "assets/play/theme/4/stage_bg.png"],
['4_title_bg', "assets/play/theme/4/title_bg.png"],
['4_l_middle_1', "assets/play/theme/4/l_middle_1.png"],
['4_l_middle_2', "assets/play/theme/4/l_middle_2.png"],
['4_pencil', "assets/play/theme/4/pencil.png"],
['4_r_bottom', "assets/play/theme/4/r_bottom.png"],
['4_r_middle', "assets/play/theme/4/r_middle.png"],
['4_box', "assets/play/theme/4/box.png"],
['4_title_rope', "assets/play/theme/4/title_rope.png"],
];
......
src/assets/play/theme/1/bg.png

91.2 KB | W: | H:

src/assets/play/theme/1/bg.png

118 KB | W: | H:

src/assets/play/theme/1/bg.png
src/assets/play/theme/1/bg.png
src/assets/play/theme/1/bg.png
src/assets/play/theme/1/bg.png
  • 2-up
  • Swipe
  • Onion skin
src/assets/play/theme/1/bg2.png

116 KB | W: | H:

src/assets/play/theme/1/bg2.png

117 KB | W: | H:

src/assets/play/theme/1/bg2.png
src/assets/play/theme/1/bg2.png
src/assets/play/theme/1/bg2.png
src/assets/play/theme/1/bg2.png
  • 2-up
  • Swipe
  • Onion skin
src/assets/play/theme/1/e-mission.png

13.7 KB | W: | H:

src/assets/play/theme/1/e-mission.png

17.2 KB | W: | H:

src/assets/play/theme/1/e-mission.png
src/assets/play/theme/1/e-mission.png
src/assets/play/theme/1/e-mission.png
src/assets/play/theme/1/e-mission.png
  • 2-up
  • Swipe
  • Onion skin
src/assets/play/theme/1/stage_bg.png

6.8 KB | W: | H:

src/assets/play/theme/1/stage_bg.png

6.26 KB | W: | H:

src/assets/play/theme/1/stage_bg.png
src/assets/play/theme/1/stage_bg.png
src/assets/play/theme/1/stage_bg.png
src/assets/play/theme/1/stage_bg.png
  • 2-up
  • Swipe
  • Onion skin
src/assets/play/theme/2/bg.png

30.8 KB | W: | H:

src/assets/play/theme/2/bg.png

138 KB | W: | H:

src/assets/play/theme/2/bg.png
src/assets/play/theme/2/bg.png
src/assets/play/theme/2/bg.png
src/assets/play/theme/2/bg.png
  • 2-up
  • Swipe
  • Onion skin
src/assets/play/theme/2/bg2.png

116 KB | W: | H:

src/assets/play/theme/2/bg2.png

117 KB | W: | H:

src/assets/play/theme/2/bg2.png
src/assets/play/theme/2/bg2.png
src/assets/play/theme/2/bg2.png
src/assets/play/theme/2/bg2.png
  • 2-up
  • Swipe
  • Onion skin
src/assets/play/theme/2/e-mission.png

15.9 KB | W: | H:

src/assets/play/theme/2/e-mission.png

12.4 KB | W: | H:

src/assets/play/theme/2/e-mission.png
src/assets/play/theme/2/e-mission.png
src/assets/play/theme/2/e-mission.png
src/assets/play/theme/2/e-mission.png
  • 2-up
  • Swipe
  • Onion skin
src/assets/play/theme/2/stage_bg.png

6.8 KB | W: | H:

src/assets/play/theme/2/stage_bg.png

5.79 KB | W: | H:

src/assets/play/theme/2/stage_bg.png
src/assets/play/theme/2/stage_bg.png
src/assets/play/theme/2/stage_bg.png
src/assets/play/theme/2/stage_bg.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