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

style: 初始化板子

parent c1cfdace
......@@ -492,7 +492,8 @@ export class PlayComponent implements OnInit, OnDestroy {
*/
initView() {
this.initBg();
// initSmallBg();
this.initBoard();
// initBoard();
// initAudioPlayer();
......@@ -501,6 +502,15 @@ export class PlayComponent implements OnInit, OnDestroy {
// 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() {
const pic = new MySprite();
pic.init(this.images.get('bg'));
......
const res = [
['bg', "assets/play/bg.jpg"],
['board', "assets/play/board.png"],
['btn_left', "assets/play/btn_left.png"],
['btn_right', "assets/play/btn_right.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