Commit 6afb1b57 authored by Seaborn Lee's avatar Seaborn Lee

style: 初始化板子

parent c1cfdace
...@@ -492,7 +492,8 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -492,7 +492,8 @@ export class PlayComponent implements OnInit, OnDestroy {
*/ */
initView() { initView() {
this.initBg(); this.initBg();
// initSmallBg(); this.initBoard();
// initBoard();
// initAudioPlayer(); // initAudioPlayer();
...@@ -501,6 +502,15 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -501,6 +502,15 @@ export class PlayComponent implements OnInit, OnDestroy {
// this.initBottomPart(); // this.initBottomPart();
} }
initBoard() {
const pic = new MySprite();
pic.init(this.images.get('board'));
pic.setScaleXY(this.mapScale);
pic.x = (pic.width / 2 - 100) * this.mapScale;
pic.y = this.canvasHeight - pic.height / 2 * this.mapScale + 50 * this.mapScale;
this.renderArr.push(pic);
}
private initBg() { private initBg() {
const pic = new MySprite(); const pic = new MySprite();
pic.init(this.images.get('bg')); pic.init(this.images.get('bg'));
......
const res = [ const res = [
['bg', "assets/play/bg.jpg"], ['bg', "assets/play/bg.jpg"],
['board', "assets/play/board.png"],
['btn_left', "assets/play/btn_left.png"], ['btn_left', "assets/play/btn_left.png"],
['btn_right', "assets/play/btn_right.png"], ['btn_right', "assets/play/btn_right.png"],
// ['text_bg', "assets/play/text_bg.png"], // ['text_bg', "assets/play/text_bg.png"],
......
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