TopDown Engine
v4.2
|
Add this class to an object that you expect to pool from an objectPooler. Note that these objects can't be destroyed by calling Destroy(), they'll just be set inactive (that's the whole point). More...
Public Member Functions | |
delegate void | Events () |
virtual void | Destroy () |
Turns the instance inactive, in order to eventually reuse it. More... | |
virtual void | TriggerOnSpawnComplete () |
Triggers the on spawn complete event More... | |
Public Member Functions inherited from MoreMountains.Tools.MMObjectBounds | |
virtual Bounds | GetBounds () |
Returns the bounds of the object, based on what has been defined More... | |
Public Attributes | |
UnityEvent | ExecuteOnEnable |
UnityEvent | ExecuteOnDisable |
float | LifeTime = 0f |
The life time, in seconds, of the object. If set to 0 it'll live forever, if set to any positive value it'll be set inactive after that time. More... | |
Public Attributes inherited from MoreMountains.Tools.MMObjectBounds | |
WaysToDetermineBounds | BoundsBasedOn |
Protected Member Functions | |
virtual void | Update () |
Called every frame More... | |
virtual void | OnEnable () |
When the objects get enabled (usually after having been pooled from an ObjectPooler, we initiate its death countdown. More... | |
virtual void | OnDisable () |
When the object gets disabled (maybe it got out of bounds), we cancel its programmed death More... | |
Protected Member Functions inherited from MoreMountains.Tools.MMObjectBounds | |
virtual void | Reset () |
When this component is added we define its bounds. More... | |
virtual void | DefineBoundsChoice () |
Tries to determine automatically what the bounds should be based on. In this order, it'll keep the last found of these : Collider2D, Collider or Renderer. If none of these is found, it'll be set as Undefined. More... | |
Events | |
Events | OnSpawnComplete |
Additional Inherited Members | |
Public Types inherited from MoreMountains.Tools.MMObjectBounds | |
enum | WaysToDetermineBounds { WaysToDetermineBounds.Collider, WaysToDetermineBounds.Collider2D, WaysToDetermineBounds.Renderer, WaysToDetermineBounds.Undefined } |
Properties inherited from MoreMountains.Tools.MMObjectBounds | |
virtual Vector3 | Size [get, set] |
Add this class to an object that you expect to pool from an objectPooler. Note that these objects can't be destroyed by calling Destroy(), they'll just be set inactive (that's the whole point).
|
virtual |
Turns the instance inactive, in order to eventually reuse it.
delegate void MoreMountains.Tools.MMPoolableObject.Events | ( | ) |
|
protectedvirtual |
When the object gets disabled (maybe it got out of bounds), we cancel its programmed death
Reimplemented in MoreMountains.TopDownEngine.Projectile, and MoreMountains.TopDownEngine.PhysicsProjectile.
|
protectedvirtual |
When the objects get enabled (usually after having been pooled from an ObjectPooler, we initiate its death countdown.
Reimplemented in MoreMountains.TopDownEngine.Projectile, MoreMountains.TopDownEngine.PhysicsProjectile, and MoreMountains.TopDownEngine.ThrownObject.
|
virtual |
Triggers the on spawn complete event
|
protectedvirtual |
Called every frame
UnityEvent MoreMountains.Tools.MMPoolableObject.ExecuteOnDisable |
UnityEvent MoreMountains.Tools.MMPoolableObject.ExecuteOnEnable |
float MoreMountains.Tools.MMPoolableObject.LifeTime = 0f |
The life time, in seconds, of the object. If set to 0 it'll live forever, if set to any positive value it'll be set inactive after that time.
Events MoreMountains.Tools.MMPoolableObject.OnSpawnComplete |