MF_AbstractMunition
Base class for fired weapon objects, such as projectiles and missiles. And also provides a common point of reference for certain variables used by other scripts.
Public Variables
deathDuration : float
Time after munition death to begin stopping all fx. A small value here will give time for fx (such as explosions) to begin.
stage : int
Mainly for missile type munitions, but could be adapted for other purposes.
stageStart : int
The stage this munition begins at.
Hidden Variables
monitor : float
A value corresponding to the percent of duration this projectile has been active.
duration : float
The maximum time this projectile can remain in the scene. This value is supplied by the weapon that fires it.
fxScript : MF_FxController
The fx script. Used so a component script can tell the fx script when a value has changed, and to track when all fx are finished.
poolRefScript : AP_Reference
The AP_Reference script that this object uses to return to its pool.
Public Methods
DoDeath : void ( )
Triggers the death of the munition and starting any fx in MF_FxController triggered by death. Will call DoDeathEnd() after deathDuration is complete.
DoDeathEnd : void ( )
Tells MF_FxController to begin stopping all fx.
FxFinished : void ( )
Sent by MF_FxController when all fx are complete, will call DoDestroy().
DoDestroy : void ( )
Destroys the munition or returns it to the pool, if any.
Base class for fired weapon objects, such as projectiles and missiles. And also provides a common point of reference for certain variables used by other scripts.
Public Variables
deathDuration : float
Time after munition death to begin stopping all fx. A small value here will give time for fx (such as explosions) to begin.
stage : int
Mainly for missile type munitions, but could be adapted for other purposes.
stageStart : int
The stage this munition begins at.
Hidden Variables
monitor : float
A value corresponding to the percent of duration this projectile has been active.
duration : float
The maximum time this projectile can remain in the scene. This value is supplied by the weapon that fires it.
fxScript : MF_FxController
The fx script. Used so a component script can tell the fx script when a value has changed, and to track when all fx are finished.
poolRefScript : AP_Reference
The AP_Reference script that this object uses to return to its pool.
Public Methods
DoDeath : void ( )
Triggers the death of the munition and starting any fx in MF_FxController triggered by death. Will call DoDeathEnd() after deathDuration is complete.
DoDeathEnd : void ( )
Tells MF_FxController to begin stopping all fx.
FxFinished : void ( )
Sent by MF_FxController when all fx are complete, will call DoDestroy().
DoDestroy : void ( )
Destroys the munition or returns it to the pool, if any.