Parameters for spawning entities. More...
Public Types | |
| enum class | ScaleModes { RELATIVE = 0 , ABSOLUTE = 1 } |
| Scale modes More... | |
Public Member Functions | |
| ksSpawnParams () | |
| Constructor More... | |
| ksSpawnParams (string entityType) | |
| Constructor More... | |
| virtual bool | Validate (bool log=true) |
| Validates the parameters. More... | |
| virtual void | Release () |
| Returns the spawn parameters object to the pool. More... | |
Static Public Member Functions | |
| static ksSpawnParams | Create () |
| Fetches a ksSpawnParams from the pool, or creates one if the pool is empty. More... | |
| static ksSpawnParams | Create (string entityType) |
| Fetches a ksSpawnParams from the pool, or creates one if the pool is empty. More... | |
Protected Member Functions | |
| virtual void | TransformAssigned () |
| Base classes can derive this to take action when a new transform is assigned. More... | |
| void | Release< T > () |
| Returns the spawn parameters object to the pool. More... | |
| virtual void | Reset () |
| Resets parameters to their default values. More... | |
Static Protected Member Functions | |
| static T | Create< T > () |
| Fetches a T from the pool, or creates one if the pool is empty. More... | |
Protected Attributes | |
| string | m_entityType |
| uint | m_assetId |
Properties | |
| string | EntityType [get, set] |
| The entity type to spawn. More... | |
| ksTransformState | Transform [get, set] |
| The transform to spawn at. More... | |
| ScaleModes | ScaleMode [get, set] |
| Is the spawn scale a relative or absolute scale? More... | |
| Dictionary< uint, ksMultiType > | Properties [get, set] |
| Properties to spawn with. More... | |
| uint | OwnerId [get, set] |
| The player id of the owner to spawn with. Zero for no owner. More... | |
| ksOwnerPermissions | Permissions [get, set] |
| The owner permissions to spawn with. Does nothing if not spawning with an owner. More... | |
| ksPlayerController | PlayerController [get, set] |
| A clone of this controller will be attached to the spawned entity. More... | |
Parameters for spawning entities.
|
strong |
Scale modes
| KS.Reactor.ksSpawnParams.ksSpawnParams | ( | ) |
Constructor
| KS.Reactor.ksSpawnParams.ksSpawnParams | ( | string | entityType | ) |
Constructor
| entityType | Entity type to spawn |
|
static |
Fetches a ksSpawnParams from the pool, or creates one if the pool is empty.
|
static |
Fetches a ksSpawnParams from the pool, or creates one if the pool is empty.
| entityType | Entity type to spawn |
|
staticprotected |
Fetches a T from the pool, or creates one if the pool is empty.
| T | Type of spawn parameters to create. |
| T | : | ksSpawnParams |
|
virtual |
Returns the spawn parameters object to the pool.
Reimplemented in KS.Reactor.ksSpawnParams2D, KS.Reactor.Client.Unity.ksClientSpawnParams2D, and KS.Reactor.Client.Unity.ksClientSpawnParams.
|
protected |
Returns the spawn parameters object to the pool.
| T | Type of spawn parameters |
| T | : | ksSpawnParams |
|
protectedvirtual |
Resets parameters to their default values.
Reimplemented in KS.Reactor.Client.Unity.ksClientSpawnParams.
|
protectedvirtual |
Base classes can derive this to take action when a new transform is assigned.
Reimplemented in KS.Reactor.ksSpawnParams2D, and KS.Reactor.Client.Unity.ksClientSpawnParams2D.
|
virtual |
Validates the parameters.
| log | True to log warnings |
Reimplemented in KS.Reactor.Client.Unity.ksClientSpawnParams.
|
getset |
The entity type to spawn.
Leave null or empty string to spawn an empty entity. Otherwise if the entity type cannot be found, no entity will be spawned.
|
getset |
The player id of the owner to spawn with. Zero for no owner.
|
getset |
The owner permissions to spawn with. Does nothing if not spawning with an owner.
|
getset |
A clone of this controller will be attached to the spawned entity.
Does nothing if not spawning with an owner.
|
getset |
Properties to spawn with.
|
getset |
Is the spawn scale a relative or absolute scale?
|
getset |
The transform to spawn at.