Tag
Tag
Stores textual tags, useful for marking entities
Kind: global class
- Tag
- instance
- .count ⇒
number
- .get(i) ⇒
String
- .add(value) ⇒
boolean
- .addAll(values)
- .getFirst() ⇒
String
- .contains(value) ⇒
boolean
- .containsAll(values)
- .containsOneOf(values) ⇒
boolean
- .getValues() ⇒
Array.<string>
- .traverse(visitor, [thisArg])
- .hash() ⇒
number
- .equals(other) ⇒
boolean
- .fromJSON(json)
- .count ⇒
- static
- .typeName :
string
- .find(tags, ecd) ⇒
Array.<number>
- .fromOne(tag) ⇒
Tag
- .fromJSON(json) ⇒
Tag
- .typeName :
- instance
tag.count ⇒ number
Kind: instance property of Tag
tag.get(i) ⇒ String
Kind: instance method of Tag
Param | Type |
---|---|
i | number |
tag.add(value) ⇒ boolean
Once the tag is added to the dataset it should be considered immutable, hence why this method is protected
Kind: instance method of Tag
Param | Type |
---|---|
value | String |
tag.addAll(values)
Add multiple tags
Kind: instance method of Tag
Param | Type |
---|---|
values | Array.<string> |
tag.getFirst() ⇒ String
Kind: instance method of Tag
tag.contains(value) ⇒ boolean
Kind: instance method of Tag
Param | Type |
---|---|
value | String |
tag.containsAll(values)
Kind: instance method of Tag
Param | Type |
---|---|
values | Array.<string> |
tag.containsOneOf(values) ⇒ boolean
Kind: instance method of Tag
Param | Type |
---|---|
values | Array.<String> |
tag.getValues() ⇒ Array.<string>
NOTE: do not modify this value
Kind: instance method of Tag
tag.traverse(visitor, [thisArg])
Kind: instance method of Tag
Param | Type |
---|---|
visitor | function |
[thisArg] | * |
tag.hash() ⇒ number
Kind: instance method of Tag
tag.equals(other) ⇒ boolean
Kind: instance method of Tag
Param | Type |
---|---|
other | Tag |
tag.fromJSON(json)
Kind: instance method of Tag
Param | Type |
---|---|
json | Array.<string> | string |
Tag.typeName : string
Kind: static property of Tag
Read only: true
Tag.find(tags, ecd) ⇒ Array.<number>
Find all entities that contain specified tags. Entity must have every tag to qualify
Kind: static method of Tag
Returns: Array.<number>
- entities
Param | Type |
---|---|
tags | Array.<string> |
ecd | EntityComponentDataset |
Tag.fromOne(tag) ⇒ Tag
Kind: static method of Tag
Param | Type |
---|---|
tag | string |
Tag.fromJSON(json) ⇒ Tag
Kind: static method of Tag
Param |
---|
json |