Key
Built-in Component that assigns a unique key to an Entity in its World.
Require
Section titled “Require”If the concord folder is in the root directory of your game, you can import this module like so:
Key = require('concord.builtins.key')The Entity must belong to a World. Calling the Component returns the key value.
Extends ComponentClass.
deserialize
Section titled “deserialize”Assigns a key from serialized data.
key:deserialize( data )Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
data |
string|number | Previously serialized key value |
removed
Section titled “removed”Callback: Clears the World key when the Component is removed (not replaced).
key:removed( replaced )Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
replaced |
boolean | True when the Component is being overwritten |