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 { ...@@ -95,15 +95,7 @@ export default class GameView extends engine.Container {
this.addChild(tmpRect); this.addChild(tmpRect);
basket_bottom.mask = 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); let gameData = this._gameData = new GameData(contPng,color);
...@@ -116,8 +108,10 @@ export default class GameView extends engine.Container { ...@@ -116,8 +108,10 @@ export default class GameView extends engine.Container {
this.addChild(countDown); this.addChild(countDown);
this._curLevelTime = getlevelTime() this._curLevelTime = getlevelTime()
let countDownLabel = this._countDownLabel = Tool.getLabel(this._curLevelTime,48,"#ffffff") let countDownLabel = this._countDownLabel = Tool.getLabel(this._curLevelTime,48,"#ffffff",false,engine.TEXT_ALIGN.CENTER)
countDownLabel.x = (countDown.width-countDownLabel.width)/2
countDownLabel.width = 160
countDownLabel.x = 0
countDownLabel.y = (countDown.height-countDownLabel.height)/2 - 5 countDownLabel.y = (countDown.height-countDownLabel.height)/2 - 5
countDown.addChild(countDownLabel); countDown.addChild(countDownLabel);
...@@ -142,6 +136,15 @@ export default class GameView extends engine.Container { ...@@ -142,6 +136,15 @@ export default class GameView extends engine.Container {
// rect.addChild(toast); // rect.addChild(toast);
this.startHandle(); 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(); this.levelHint();
} }
private _lvbg; private _lvbg;
...@@ -241,7 +244,7 @@ export default class GameView extends engine.Container { ...@@ -241,7 +244,7 @@ export default class GameView extends engine.Container {
this._gameData.levelUpdate(); this._gameData.levelUpdate();
this._curLevelTime = getlevelTime() this._curLevelTime = getlevelTime()
this._countDownLabel.text = 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
this.runEngine(); this.runEngine();
} }
themeChange(data){ themeChange(data){
...@@ -395,7 +398,7 @@ export default class GameView extends engine.Container { ...@@ -395,7 +398,7 @@ export default class GameView extends engine.Container {
updateCountDown(){ updateCountDown(){
this._curLevelTime -- this._curLevelTime --
this._countDownLabel.text = 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) if(this._curLevelTime <= 0)
{ {
this.end(); this.end();
......
...@@ -29,7 +29,7 @@ export class GameWrapper extends engine.Container { ...@@ -29,7 +29,7 @@ export class GameWrapper extends engine.Container {
//this.start(null); //this.start(null);
// setTimeout(() => { // setTimeout(() => {
// engine.globalEvent.dispatchEvent('seabed-game-startNextLevel',{level:2}); // engine.globalEvent.dispatchEvent('seabed-game-startNextLevel',{level:1});
// }, 300); // }, 300);
} }
start(event: engine.Event) { 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