@woosh/meep-engine
Version:
Pure JavaScript game engine. Fully featured and production ready.
113 lines • 2.4 kB
TypeScript
/**
* Stores textual tags, useful for tagging entities.
*/
export class Tag {
/**
* Find all entities that contain specified tags. Entity must have every tag to qualify
* @param {string[]} tags
* @param {EntityComponentDataset} ecd
* @returns {number[]} entities
*/
static find(tags: string[], ecd: EntityComponentDataset): number[];
/**
*
* @param {string} tag
* @returns {Tag}
*/
static fromOne(tag: string): Tag;
/**
*
* @param json
* @returns {Tag}
*/
static fromJSON(json: any): Tag;
/**
* Utility constructor
* @param {string} label
* @return {Tag}
*/
static from(...label: string): Tag;
/**
* @private
* @type {string[]}
*/
private values;
/**
*
* @returns {number}
*/
get count(): number;
/**
*
* @param {number} i
* @returns {string}
*/
get(i: number): string;
clear(): void;
/**
* Once the tag is added to the dataset it should be considered immutable, hence why this method is protected
* @param {string} value
* @returns {boolean}
*/
add(value: string): boolean;
/**
* Add multiple tags
* @param {string[]} values
*/
addAll(values: string[]): void;
/**
*
* @returns {string}
*/
getFirst(): string;
/**
*
* @param {string} value
* @returns {boolean}
*/
contains(value: string): boolean;
/**
*
* @param {string[]} values
*/
containsAll(values: string[]): boolean;
/**
*
* @param {string[]} values
* @returns {boolean}
*/
containsOneOf(values: string[]): boolean;
/**
* NOTE: do not modify this value
* @returns {string[]}
*/
getValues(): string[];
/**
*
* @param {function(string)} visitor
* @param {*} [thisArg]
*/
traverse(visitor: (arg0: string) => any, thisArg?: any): void;
/**
*
* @return {number}
*/
hash(): number;
/**
*
* @param {Tag} other
* @return {boolean}
*/
equals(other: Tag): boolean;
toJSON(): string[];
/**
*
* @param {string[]|string} json
*/
fromJSON(json: string[] | string): void;
}
export namespace Tag {
let typeName: string;
}
export default Tag;
//# sourceMappingURL=Tag.d.ts.map