Commit ebe1877a authored by 任建锋's avatar 任建锋

--

parent bc556643
No preview for this file type
This diff is collapsed.
This diff is collapsed.
...@@ -15,17 +15,16 @@ ...@@ -15,17 +15,16 @@
//# sourceMappingURL=props.js.map //# sourceMappingURL=props.js.map
function getTexture(uuid) { function getTexture(uuid) {
return engine.Texture.from(engine.getAssetByUUID(uuid).uuid); return engine.Texture.from(getAssetByUUID(uuid).uuid);
} }
function getTextureByName(name) { function getTextureByName(name) {
return getTexture(engine.getAssetByName(name).uuid); return getTexture(getAssetByName(name).uuid);
} }
function createSvga(name, anchorName) { function createSvga(name, anchorName) {
var inst = new svga.Svga(); var inst = new svga.Svga();
inst.source = 'asset://' + engine.getAssetByName(name).uuid; inst.source = 'asset://' + getAssetByName(name).uuid;
return inst; return inst;
} }
//# sourceMappingURL=utils.js.map
var Goods = (function (_super) { var Goods = (function (_super) {
tslib.__extends(Goods, _super); tslib.__extends(Goods, _super);
...@@ -446,6 +445,7 @@ ...@@ -446,6 +445,7 @@
}; };
return GameView; return GameView;
}(engine.Container)); }(engine.Container));
//# sourceMappingURL=GameView.js.map
var GameWrapper = (function (_super) { var GameWrapper = (function (_super) {
tslib.__extends(GameWrapper, _super); tslib.__extends(GameWrapper, _super);
......
...@@ -3,18 +3,18 @@ ...@@ -3,18 +3,18 @@
*/ */
export function getTexture(uuid) { export function getTexture(uuid) {
return engine.Texture.from(engine.getAssetByUUID(uuid).uuid); return engine.Texture.from(getAssetByUUID(uuid).uuid);
} }
export function getTextureByName(name) { export function getTextureByName(name) {
return getTexture(engine.getAssetByName(name).uuid); return getTexture(getAssetByName(name).uuid);
} }
export function playSound(name) { export function playSound(name) {
engine.playSound(engine.getAssetByName(name).uuid, {keep: true}); engine.playSound(getAssetByName(name).uuid, {keep: true});
} }
export function createSvga(name, anchorName?) { export function createSvga(name, anchorName?) {
let inst = new svga.Svga(); let inst = new svga.Svga();
inst.source = 'asset://' + engine.getAssetByName(name).uuid; inst.source = 'asset://' + getAssetByName(name).uuid;
return inst; return inst;
} }
\ No newline at end of file
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
function injectProps(p) { function injectProps(p) {
engine.injectProp(props, p); engine.injectProp(props, p);
} }
//# sourceMappingURL=props.js.map
function getTexture(uuid) { function getTexture(uuid) {
return engine.Texture.from(getAssetByUUID(uuid).uuid); return engine.Texture.from(getAssetByUUID(uuid).uuid);
...@@ -106,7 +105,6 @@ ...@@ -106,7 +105,6 @@
}); });
return Goods; return Goods;
}(engine.Container)); }(engine.Container));
//# sourceMappingURL=Goods.js.map
var ObjectPool = engine.ObjectPool; var ObjectPool = engine.ObjectPool;
var PoolName = 'goods'; var PoolName = 'goods';
...@@ -115,7 +113,6 @@ ...@@ -115,7 +113,6 @@
}, function (item, data) { }, function (item, data) {
item.reset(); item.reset();
}); });
//# sourceMappingURL=object-pool-init.js.map
var ObjectPool$1 = engine.ObjectPool; var ObjectPool$1 = engine.ObjectPool;
var GameView = (function (_super) { var GameView = (function (_super) {
...@@ -200,6 +197,7 @@ ...@@ -200,6 +197,7 @@
}; };
GameView.prototype.reset = function () { GameView.prototype.reset = function () {
this.recycleGoods(); this.recycleGoods();
this.player.x = 375 - this.player.width / 2;
}; };
GameView.prototype.start = function () { GameView.prototype.start = function () {
var _this = this; var _this = this;
...@@ -350,7 +348,6 @@ ...@@ -350,7 +348,6 @@
}; };
return GameView; return GameView;
}(engine.Container)); }(engine.Container));
//# sourceMappingURL=GameView.js.map
var GameWrapper = (function (_super) { var GameWrapper = (function (_super) {
tslib.__extends(GameWrapper, _super); tslib.__extends(GameWrapper, _super);
...@@ -393,7 +390,6 @@ ...@@ -393,7 +390,6 @@
}; };
return GameWrapper; return GameWrapper;
}(engine.Container)); }(engine.Container));
//# sourceMappingURL=GameWrapper.js.map
function index (props) { function index (props) {
prepareProps(); prepareProps();
...@@ -401,7 +397,6 @@ ...@@ -401,7 +397,6 @@
var instance = new GameWrapper(); var instance = new GameWrapper();
return instance; return instance;
} }
//# sourceMappingURL=index.js.map
return index; return index;
......
This diff is collapsed.
...@@ -141,6 +141,7 @@ export default class GameView extends engine.Container { ...@@ -141,6 +141,7 @@ export default class GameView extends engine.Container {
*/ */
reset() { reset() {
this.recycleGoods() this.recycleGoods()
this.player.x = 375 - this.player.width / 2;
} }
/** /**
......
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