Commit e429ce50 authored by wanghuan's avatar wanghuan

seabed-game-basket

parent 088c4d2b
......@@ -84,7 +84,10 @@ export default class GameView extends engine.Container {
// light.y = 44;
// gameNode.addChild(light);
let basket_bottom = this._basket_bottom = new engine.Sprite(getTextureByName('basket_bottom'));
let basket_bottom = this._basket_bottom = new engine.Sprite(engine.Texture.fromImage(resData.basketBottomImg));
if(!basket_bottom || !this._basket_bottom){
basket_bottom = this._basket_bottom = new engine.Sprite(getTextureByName('basket_bottom'));
}
basket_bottom.x = 286.5;
basket_bottom.y = 85;
gameNode.addChild(basket_bottom);
......@@ -138,7 +141,10 @@ export default class GameView extends engine.Container {
// rect.addChild(toast);
this.startHandle();
let basket_top = this._basket_top = new engine.Sprite(getTextureByName('basket_top'));
let basket_top = this._basket_top = new engine.Sprite(engine.Texture.fromImage(resData.basketTopImg));
if(!basket_top || !this._basket_top){
basket_top = this._basket_top = new engine.Sprite(getTextureByName('basket_top'));
}
basket_top.x = 287;
basket_top.y = 485;
this.addChild(basket_top);
......
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