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