UNPKG

@phaserjs/phaser

Version:
13 lines (12 loc) 249 B
let instance; export const TextureManagerInstance = { get: () => { return instance; }, set: (manager) => { if (instance) { throw new Error("Cannot instantiate TextureManager more than once"); } instance = manager; } };