UNPKG

@drincs/pixi-vn

Version:

Pixi'VN is a npm package that provides various features for creating visual novels.

1 lines 904 B
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}}export{v as default,E as getEventInstanceById,c as getEventTypeById,i as registeredEvents};