Hydrogen Framework  1.3.1
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Hydrogen.Core.ObjectPoolItemBase Class Referenceabstract

The base for all classes which want to extend the behaviour of an ObjectPoolItem, these methods need to be implemented for the efficient use of the Object Pool system. More...

+ Inheritance diagram for Hydrogen.Core.ObjectPoolItemBase:

Public Member Functions

abstract void DespawnSafely ()
 Simple function which delays the despawning based on whatever you define. More...
 
abstract bool IsInactive ()
 Is the GameObject idle, and therefore can be despawned organically? More...
 
abstract void OnDespawned ()
 Raised when the GameObject is despawned back into it's Object Pool. More...
 
abstract void OnSpawned ()
 Raised when the GameObject is spawned from it's Object Pool. More...
 

Detailed Description

The base for all classes which want to extend the behaviour of an ObjectPoolItem, these methods need to be implemented for the efficient use of the Object Pool system.

Definition at line 37 of file ObjectPoolItemBase.cs.

Member Function Documentation

abstract void Hydrogen.Core.ObjectPoolItemBase.DespawnSafely ( )
pure virtual

Simple function which delays the despawning based on whatever you define.

If you are going to utilize this make sure that your function contains: hObjectPool.Instance.objectPools[poolID].DespawnImmediate(gameObject);

Implemented in Hydrogen.Core.WebPoolWorker, and hObjectPoolItem.

abstract bool Hydrogen.Core.ObjectPoolItemBase.IsInactive ( )
pure virtual

Is the GameObject idle, and therefore can be despawned organically?

Returns
true if this instance is inactive; otherwise, false.

This will only work on tracked spawned objects.

Implemented in Hydrogen.Core.WebPoolWorker, and hObjectPoolItem.

abstract void Hydrogen.Core.ObjectPoolItemBase.OnDespawned ( )
pure virtual

Raised when the GameObject is despawned back into it's Object Pool.

It does not set "active", you must handle that yourself.

Implemented in Hydrogen.Core.WebPoolWorker, and hObjectPoolItem.

abstract void Hydrogen.Core.ObjectPoolItemBase.OnSpawned ( )
pure virtual

Raised when the GameObject is spawned from it's Object Pool.

It does not set "active", you must handle that yourself.

Implemented in Hydrogen.Core.WebPoolWorker, and hObjectPoolItem.