Commit ec98a15d authored by lujinlei's avatar lujinlei

-a

parent d811d190
This diff is collapsed.
...@@ -4,11 +4,8 @@ ...@@ -4,11 +4,8 @@
(global = global || self, global['jiugong-turntable-change'] = factory(global.tslib)); (global = global || self, global['jiugong-turntable-change'] = factory(global.tslib));
}(this, (function (tslib) { 'use strict'; }(this, (function (tslib) { 'use strict';
function getTexture(uuid) {
return engine.Texture.from(getAssetByUUID(uuid).uuid);
}
function getTextureByName(name) { function getTextureByName(name) {
return getTexture(engine.getAssetByName(name).uuid); return engine.Texture.from(getAssetByName(name).uuid);
} }
var props = {}; var props = {};
......
...@@ -114,6 +114,7 @@ export class Turntable extends engine.Container{ ...@@ -114,6 +114,7 @@ export class Turntable extends engine.Container{
getImage(resName,alpha){ getImage(resName,alpha){
let tmpImage = new engine.Sprite(getTextureByName(resName)); let tmpImage = new engine.Sprite(getTextureByName(resName));
tmpImage.x = 0 tmpImage.x = 0
tmpImage.y = 0 tmpImage.y = 0
tmpImage.alpha = alpha; tmpImage.alpha = alpha;
......
...@@ -8,7 +8,7 @@ export function getTexture(uuid) { ...@@ -8,7 +8,7 @@ export function getTexture(uuid) {
} }
export function getTextureByName(name) { export function getTextureByName(name) {
return getTexture(engine.getAssetByName(name).uuid); return engine.Texture.from(getAssetByName(name).uuid);
} }
export function playSound(name) { export function playSound(name) {
......
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