World:setKeyGenerator
Sets the function used to generate Entity keys.
Sets the function used to generate Entity keys.
world = world:setKeyGenerator( generator, initialState )Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
generator |
fun(state: any): string|number, | any Callable that receives the current state and returns key, newState |
initialState |
any | Initial state passed to the generator |
Returns
Section titled “Returns”| Name | Type | Description |
|---|---|---|
world |
World |