Commit 2408c97e authored by Chen Jiping's avatar Chen Jiping

完善

parent 56648c24
......@@ -117,9 +117,9 @@ export class Answer{
content_val.text = this.answerContent.text;
content_val.textAlign = 'middle';
content_val.fontSize = 66;
content_val.fontName = "arial";
content_val.fontName = "MMTextBook-Bold";
content_val.fontColor = "#FBEB4F";
content_val.setOutline(3, '#315305');
content_val.setOutline(5, '#315305');
content_val.alpha = 0;
content_val.refreshSize();
......
......@@ -57,9 +57,6 @@ export class Player {
let width = playerPic.getBoundingBox().width;
let height = playerPic.getBoundingBox().height;
let rect = {x:0, y:0, width: width, height:height};
playerPic.setShowRect(rect);
const bg = new ShapeRect();
bg.setSize(width, height);
bg.alpha = 0;
......
......@@ -28,23 +28,23 @@ export class Stage {
rightDoor;
rightDorrInitX;
constructor(images){
constructor(images) {
this.images = images;
}
setScaleXY(scale){
setScaleXY(scale) {
this.scaleX = this.scaleY = scale;
}
init(){
init() {
const stage_box = new MySprite();
stage_box.init(this.images.get('stage_box'));
stage_box.init(this.images.get('stage_box'), 0.5, 1);
stage_box.scaleX = this.scaleX;
stage_box.scaleY = this.scaleY;
let width = stage_box.getBoundingBox().width;
let height = stage_box.getBoundingBox().height;
let width = 1280 * this.scaleX;
let height = 713 * this.scaleY;
const bg = new ShapeRect();
......@@ -57,7 +57,7 @@ export class Stage {
stage_bg.scaleX = this.scaleX;
stage_bg.scaleY = this.scaleY;
stage_bg.x = width / 2;
stage_bg.y = 52 * this.scaleY + stage_bg.getBoundingBox().height / 2;
stage_bg.y = 53 * this.scaleY + stage_bg.getBoundingBox().height / 2;
bg.addChild(stage_bg);
......@@ -88,28 +88,12 @@ export class Stage {
//初始化门
this.initDoor();
stage_box.x = width / 2;
stage_box.y = height /2;
stage_box.x = width / 2 + 1 * this.scaleX;
stage_box.y = height;
bg.addChild(stage_box);
const left = new MySprite();
left.init(this.images.get('bg_1'));
left.scaleX = this.scaleX;
left.scaleY = this.scaleY;
left.x = - left.getBoundingBox().width / 2;
left.y = height - left.getBoundingBox().height/ 2;
bg.addChild(left);
const right = new MySprite();
right.init(this.images.get('bg_1'));
right.scaleX = this.scaleX;
right.scaleY = this.scaleY;
right.x = bg.width + left.getBoundingBox().width / 2;
right.y = left.y;
bg.addChild(right);
}
private initDoor(){
private initDoor() {
const leftDoor = new MySprite();
leftDoor.init(this.images.get('doorleft'), 0);
leftDoor.scaleX = this.scaleX;
......@@ -131,21 +115,21 @@ export class Stage {
this.rightDorrInitX = rightDoor.x;
}
setPromptText(text){
setPromptText(text) {
this.prompt.text = text;
}
closeDoor(callback = null){
closeDoor(callback = null) {
tweenChange(this.leftDoor, {x : 75 * this.scaleX}, 2, callback);
tweenChange(this.leftDoor, { x: 75 * this.scaleX }, 2, callback);
let toX = this.rightDorrInitX - this.rightDoor.getBoundingBox().width;
tweenChange(this.rightDoor, {x : toX}, 2);
tweenChange(this.rightDoor, { x: toX }, 2);
}
openDoor(callback = null){
tweenChange(this.leftDoor, {x : this.leftDoorInitX}, 2, callback);
openDoor(callback = null) {
tweenChange(this.leftDoor, { x: this.leftDoorInitX }, 2, callback);
tweenChange(this.rightDoor, {x : this.rightDorrInitX}, 2);
tweenChange(this.rightDoor, { x: this.rightDorrInitX }, 2);
}
}
\ No newline at end of file
......@@ -19,6 +19,6 @@
@font-face
{
font-family: 'arial';
src: url("../../assets/font/arial.ttf") ;
font-family: 'MMTextBook-Bold';
src: url("../../assets/font/MMTextBook-Bold.otf") ;
}
\ No newline at end of file
......@@ -647,8 +647,6 @@ export class PlayComponent implements OnInit, OnDestroy {
*/
initView() {
this.initBg();
this.initPic();
this.initPlayer();
......
src/assets/play/stage_box.png

373 KB | W: | H:

src/assets/play/stage_box.png

429 KB | W: | H:

src/assets/play/stage_box.png
src/assets/play/stage_box.png
src/assets/play/stage_box.png
src/assets/play/stage_box.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