// UID.js
(function () {
/* global AdventureJS A */
/**
*
* @class AdventureJS.FX.UID
* @ajsnavheading EngineClasses
* @ajsinternal
* @summary Generates sequential unique ID numbers.
* @classdesc
* <p>
* Global utility for generating sequential unique ID numbers.
* The UID class uses a static interface (ex.
* <code class="property">UID.get()</code>)
* and should not be instantiated.
* </p>
* <p>
* Shamelessly cribbed from
* <a href="https://www.createjs.com/">create.js</a> by
* <a href="https://gskinner.com/">gskinner</a>
* </p>
*/
function UID() {
throw "UID cannot be instantiated";
}
// private static properties:
/**
* @method AdventureJS.FX.UID#_nextID
* @memberOf AdventureJS.FX.UID
* @type Number
* @protected
**/
UID._nextID = 0;
// public static methods:
/**
* Returns the next unique id.
* @method AdventureJS.FX.UID#get
* @memberOf AdventureJS.FX.UID
**/
UID.get = function UID_get() {
return "_" + UID._nextID++;
};
AdventureJS.FX.UID = UID;
})();