@drincs/pixi-vn
Version:
Pixi'VN is a npm package that provides various features for creating visual novels.
1 lines • 986 B
JavaScript
;Object.defineProperty(exports,'__esModule',{value:true});var o;(a=>(a.log=(n,...r)=>console.log(`[Pixi\u2019VN] ${n}`,...r),a.warn=(n,...r)=>console.warn(`[Pixi\u2019VN] ${n}`,...r),a.error=(n,...r)=>console.error(`[Pixi\u2019VN] ${n}`,...r),a.info=(n,...r)=>console.info(`[Pixi\u2019VN] ${n}`,...r)))(o||={});var i={};function v(e){return function(t){e||(e=t.name),i[e]&&o.info(`Event ${e} already exists, it will be overwritten`),t.prototype.id=e,i[e]=t;}}function c(e){try{let t=i[e];if(!t){o.error(`Event ${e} not found, did you forget to register it with the eventDecorator?`);return}return new t,t}catch(t){o.error(`Error while getting Event ${e}`,t);return}}function E(e){try{let t=i[e];if(!t){o.error(`Event ${e} not found, did you forget to register it with the eventDecorator?`);return}return new t}catch(t){o.error(`Error while getting Event ${e}`,t);return}}exports.default=v;exports.getEventInstanceById=E;exports.getEventTypeById=c;exports.registeredEvents=i;