Commit cc65c4f8 authored by lujinlei's avatar lujinlei

-a

parent 7b597ba5
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -95,15 +95,7 @@ export default class GameView extends engine.Container {
this.addChild(tmpRect);
basket_bottom.mask = tmpRect;
let basket_top = this._basket_top = new engine.Sprite(getTextureByName('basket_top'));
basket_top.x = 287;
basket_top.y = 485;
this.addChild(basket_top);
let glass = this._basket_top = new engine.Sprite(getTextureByName('玻璃'));
glass.x = (750-glass.width)/2;
glass.y = 340;
this.addChild(glass);
let gameData = this._gameData = new GameData(contPng,color);
......@@ -116,8 +108,10 @@ export default class GameView extends engine.Container {
this.addChild(countDown);
this._curLevelTime = getlevelTime()
let countDownLabel = this._countDownLabel = Tool.getLabel(this._curLevelTime,48,"#ffffff")
countDownLabel.x = (countDown.width-countDownLabel.width)/2
let countDownLabel = this._countDownLabel = Tool.getLabel(this._curLevelTime,48,"#ffffff",false,engine.TEXT_ALIGN.CENTER)
countDownLabel.width = 160
countDownLabel.x = 0
countDownLabel.y = (countDown.height-countDownLabel.height)/2 - 5
countDown.addChild(countDownLabel);
......@@ -142,6 +136,15 @@ export default class GameView extends engine.Container {
// rect.addChild(toast);
this.startHandle();
let basket_top = this._basket_top = new engine.Sprite(getTextureByName('basket_top'));
basket_top.x = 287;
basket_top.y = 485;
this.addChild(basket_top);
let glass = this._basket_top = new engine.Sprite(getTextureByName('玻璃'));
glass.x = (750-glass.width)/2;
glass.y = 340;
this.addChild(glass);
this.levelHint();
}
private _lvbg;
......@@ -241,7 +244,7 @@ export default class GameView extends engine.Container {
this._gameData.levelUpdate();
this._curLevelTime = getlevelTime()
this._countDownLabel.text = this._curLevelTime;
this._countDownLabel.x = (this._countDown.width-this._countDownLabel.width)/2
//this._countDownLabel.x = (this._countDown.width-this._countDownLabel.width)/2
this.runEngine();
}
themeChange(data){
......@@ -395,7 +398,7 @@ export default class GameView extends engine.Container {
updateCountDown(){
this._curLevelTime --
this._countDownLabel.text = this._curLevelTime;
this._countDownLabel.x = (this._countDown.width-this._countDownLabel.width)/2
//this._countDownLabel.x = (this._countDown.width-this._countDownLabel.width)/2
if(this._curLevelTime <= 0)
{
this.end();
......
......@@ -29,7 +29,7 @@ export class GameWrapper extends engine.Container {
//this.start(null);
// setTimeout(() => {
// engine.globalEvent.dispatchEvent('seabed-game-startNextLevel',{level:2});
// engine.globalEvent.dispatchEvent('seabed-game-startNextLevel',{level:1});
// }, 300);
}
start(event: engine.Event) {
......
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