Core GameKit  3.2.9.0
The ultimate pooling / combat / spawning / variable plugin!
DarkTonic.CoreGameKit.PoolBossExtensions Class Reference

Extension methods of Pool Boss methods, that you can call with one less parameter from the Transform component. More...

Static Public Member Functions

static bool AllOfPrefabAreDespawned (this Transform transPrefab)
 Call this method to find out if all are despawned More...
 
static void CreateNewPoolItem (this Transform itemTrans, int preloadInstances, bool canInstantiateMore, int hardLimit, bool logMsgs, string catName, PoolBoss.PrefabSource prefabSource)
 This method allows you to add a new Pool Item at runtime. More...
 
static void DamageAllOfPrefab (this Transform transToDespawn, int damagePoints)
 This method will damage all spawned instances of the prefab you pass in. More...
 
static bool Despawn (this Transform transToDespawn)
 Call this method to despawn a prefab using Pool Boss. All the Spawners and Killable use this method. More...
 
static void DespawnAllOfPrefab (this Transform transToDespawn)
 This method will despawn all spawned instances of the prefab you pass in. More...
 
static string GetPrefabName (this Transform trans)
 This will return the name of the game object's prefab without "(Clone X)" in the name. It is used internally by PoolBoss for a lot of things. More...
 
static void KillAllOfPrefab (this Transform transToKill)
 This method will "Kill" all spawned instances of the prefab you pass in. More...
 
static Transform NextPoolItemToSpawn (this Transform trans)
 Call this get the next available item to spawn for a pool item. More...
 
static int PrefabDespawnedCount (this Transform transPrefab)
 This will tell you how many available clones of a prefab are despawned and ready to spawn. A value of -1 indicates an error More...
 
static bool PrefabIsInPool (this Transform trans)
 Call this method determine if the item (Transform) you pass in is set up in Pool Boss. More...
 
static int PrefabSpawnedCount (this Transform transPrefab)
 This will tell you how many clones of a prefab are already spawned out of Pool Boss. A value of -1 indicates an error More...
 
static Transform SpawnInPool (this Transform transToSpawn, Vector3 position, Quaternion rotation)
 Call this method to spawn a prefab using Pool Boss, which will be a child of the Pool Boss prefab. More...
 
static Transform SpawnOutsidePool (this Transform transToSpawn, Vector3 position, Quaternion rotation)
 Call this method to spawn a prefab using Pool Boss, which will be spawned with no parent Transform (outside the pool) More...
 
static Transform Spawn (this Transform transToSpawn, Vector3 position, Quaternion rotation, Transform parentTransform)
 Call this method to spawn a prefab using Pool Boss. All the Spawners and Killable use this method. More...
 
static Transform OnLayer (this Transform spawned, int layer)
 Changes the layer of a just spawned Transform More...
 
static Transform WithScale (this Transform spawned, Vector3 newScale)
 Changes the scale of a spawned Transform More...
 

Detailed Description

Extension methods of Pool Boss methods, that you can call with one less parameter from the Transform component.

Member Function Documentation

static bool DarkTonic.CoreGameKit.PoolBossExtensions.AllOfPrefabAreDespawned ( this Transform  transPrefab)
static

Call this method to find out if all are despawned

Parameters
transPrefabThe transform of the prefab you are asking about.
Returns
Boolean value.
static void DarkTonic.CoreGameKit.PoolBossExtensions.CreateNewPoolItem ( this Transform  itemTrans,
int  preloadInstances,
bool  canInstantiateMore,
int  hardLimit,
bool  logMsgs,
string  catName,
PoolBoss.PrefabSource  prefabSource 
)
static

This method allows you to add a new Pool Item at runtime.

Parameters
itemTransThe Transform of the item.
preloadInstancesThe number of instances to preload.
canInstantiateMoreCan instantiate more or not
hardLimitItem Hard Limit
logMsgsLog messages during spawn and despawn.
catNameCategory name
prefabSourcePrefab source
prefabAddressablePrefab Addressable, if Addressable feature enabled
static void DarkTonic.CoreGameKit.PoolBossExtensions.DamageAllOfPrefab ( this Transform  transToDespawn,
int  damagePoints 
)
static

This method will damage all spawned instances of the prefab you pass in.

Parameters
transToDespawnTransform component of a prefab
damagePointsHow many points of damage to deal to each
static bool DarkTonic.CoreGameKit.PoolBossExtensions.Despawn ( this Transform  transToDespawn)
static

Call this method to despawn a prefab using Pool Boss. All the Spawners and Killable use this method.

Parameters
transToDespawnTransform to despawn
Returns
true if despawned
static void DarkTonic.CoreGameKit.PoolBossExtensions.DespawnAllOfPrefab ( this Transform  transToDespawn)
static

This method will despawn all spawned instances of the prefab you pass in.

Parameters
transToDespawnTransform component of a prefab
static string DarkTonic.CoreGameKit.PoolBossExtensions.GetPrefabName ( this Transform  trans)
static

This will return the name of the game object's prefab without "(Clone X)" in the name. It is used internally by PoolBoss for a lot of things.

Parameters
transThe Transform of the game object
Returns
string
static void DarkTonic.CoreGameKit.PoolBossExtensions.KillAllOfPrefab ( this Transform  transToKill)
static

This method will "Kill" all spawned instances of the prefab you pass in.

Parameters
transToKillTransform component of a prefab
static Transform DarkTonic.CoreGameKit.PoolBossExtensions.NextPoolItemToSpawn ( this Transform  trans)
static

Call this get the next available item to spawn for a pool item.

Parameters
transTransform you want to get the next item to spawn for.
Returns
Transform
static Transform DarkTonic.CoreGameKit.PoolBossExtensions.OnLayer ( this Transform  spawned,
int  layer 
)
static

Changes the layer of a just spawned Transform

Parameters
spawnedSpawned Transform
layerThe layer
Returns
Transform
static int DarkTonic.CoreGameKit.PoolBossExtensions.PrefabDespawnedCount ( this Transform  transPrefab)
static

This will tell you how many available clones of a prefab are despawned and ready to spawn. A value of -1 indicates an error

Parameters
transPrefabThe transform component of the prefab you want the despawned count of.
Returns
Integer value.
static bool DarkTonic.CoreGameKit.PoolBossExtensions.PrefabIsInPool ( this Transform  trans)
static

Call this method determine if the item (Transform) you pass in is set up in Pool Boss.

Parameters
transTransform you want to know is in the Pool or not.
Returns
Boolean value.
static int DarkTonic.CoreGameKit.PoolBossExtensions.PrefabSpawnedCount ( this Transform  transPrefab)
static

This will tell you how many clones of a prefab are already spawned out of Pool Boss. A value of -1 indicates an error

Parameters
transPrefabThe transform component of the prefab you want the spawned count of.
Returns
Integer value.
static Transform DarkTonic.CoreGameKit.PoolBossExtensions.Spawn ( this Transform  transToSpawn,
Vector3  position,
Quaternion  rotation,
Transform  parentTransform 
)
static

Call this method to spawn a prefab using Pool Boss. All the Spawners and Killable use this method.

Parameters
transToSpawnTransform to spawn
positionThe position to spawn it at
rotationThe rotation to use
parentTransformThe parent Transform to use
Returns
The Transform of the spawned object. It can be null if spawning failed from limits you have set.
static Transform DarkTonic.CoreGameKit.PoolBossExtensions.SpawnInPool ( this Transform  transToSpawn,
Vector3  position,
Quaternion  rotation 
)
static

Call this method to spawn a prefab using Pool Boss, which will be a child of the Pool Boss prefab.

Parameters
transToSpawnTransform to spawn
positionThe position to spawn it at
rotationThe rotation to use
Returns
The Transform of the spawned object. It can be null if spawning failed from limits you have set.
static Transform DarkTonic.CoreGameKit.PoolBossExtensions.SpawnOutsidePool ( this Transform  transToSpawn,
Vector3  position,
Quaternion  rotation 
)
static

Call this method to spawn a prefab using Pool Boss, which will be spawned with no parent Transform (outside the pool)

Parameters
transToSpawnTransform to spawn
positionThe position to spawn it at
rotationThe rotation to use
Returns
The Transform of the spawned object. It can be null if spawning failed from limits you have set.
static Transform DarkTonic.CoreGameKit.PoolBossExtensions.WithScale ( this Transform  spawned,
Vector3  newScale 
)
static

Changes the scale of a spawned Transform

Parameters
spawnedSpawned Transform
newScaleNew scale to use
Returns
Transform

The documentation for this class was generated from the following file: