react-simple-game-engine
Version:
[WIP] not able to use in currently. <!-- Document cumming soon... -->
17 lines (16 loc) • 446 B
JavaScript
export function SpriteFrom(source) {
return function (target, propertyKey) {
var src = (source
? typeof source === "string"
? { src: source }
: source
: { src: undefined }).src;
if (!target.spritesDecor) {
target.spritesDecor = [];
}
target.spritesDecor.push({
propertyKey: propertyKey,
src: src,
});
};
}