MF_AbstractStats
Base class for stats scripts. And also provides a common point of reference for certain variables used by other scripts.
Public Variables
Various properties that can be accessed by other scripts. These properties are overridden by a class that inherits MF_AbstractStats and are used in different ways.
shield : float
The current shield value of this unit.
shieldMax : float
The maximum shield value of this unit.
armor : float
The current shield value of this unit.
armorMax : float
The maximum shield value of this unit.
health : float
The current shield value of this unit.
healthMax : float
The maximum shield value of this unit.
energy : float
The current energy value of this unit.
energyMax : float
The maximum energy value of this unit.
stage : float
The current stage value of this unit.
stageStart : float
The starting stage value of this unit.
size : float
The size value of this unit.
monitor : float
A separate value that can be read by MF_FxController. Typically in the range of 0-1.
disableAt : enum DisableTime { Dying, Death, DontDisable }
When this unit is killed, when to disable the object. This can be used to time various fx.
dyingDuration : float
'Dying' is an intermediate stage prior to death. A value here can give time to perform actions or show various effects before being killed.
deathDuration : float
How long to wait before fx are told to end. A small value here will give time for fx to begin.
Hidden Variables
damageID : float
Used to prevent an explosion from damaging the same status script more than once per frame.
fxScript : List <MF_FxController>
A list of fx scripts that have added themselves for referencing. Used so a component script can tell the various fx scripts when a value has changed, and when all fx are finished.
statsScript : List <MF_AbstractStats>
A list of other stats scripts that have added themselves for referencing. Used track when other stats scripts have finished their fx.
poolRefScript : AP_Reference
The AP_Reference script that this object uses to return to its pool.
Public Methods
DoDamage : float ( damage : float )
Applies general damage to stats in order of shield > armor > health. When one stat becomes 0, any remaining damage is applied to the next in line.
DoDamage : float ( damage : float, apply : enum MFnum.StatType )
enum MFnum.StatModType { General, Shield, Armor, Health, Energy }
Applies general damage to a specific stat. Extra damage will not carry over.
DoDamage : float ( damage : float, damType : enum MFnum.DamageType, loc : Vector3, audio : AudioSource,
multS : float, multA : float, multH : float, multE : float, multPen : float, addReduce : float )
enum MFnum.DamageType { General, Kinetic, Explosive, Thermal, Chemical, Energy, Ion }
Applies detailed damage to stats in order of shield > armor > health. When one stat becomes 0, any remaining damage is applied to the next in line. Additional fields can be used for processing more advanced interactions.
DoDamage : float ( damage : float, apply : enum MFnum.StatType, damType : enum MFnum.DamageType,
loc : Vector3, audio : AudioSource, multS : float, multA : float, multH : float, multE : float, multPen : float, addReduce : float )
Applies detailed damage to a specific stat. Extra damage will not carry over. Additional fields can be used for processing more advanced interactions.
ApplyDamage : float ( stat : enum MFnum.StatType, damage : float, apply : enum MFnum.StatType,
damType : enum MFnum.DamageType, loc : Vector3, audio : AudioSource, multS : float, multA : float, multH : float, multE : float,
multPen : float, addReduce : float )
Returns unmodified damage. Intended to be overridden by a script that inherits this to do the actual evaluation.
Base class for stats scripts. And also provides a common point of reference for certain variables used by other scripts.
Public Variables
Various properties that can be accessed by other scripts. These properties are overridden by a class that inherits MF_AbstractStats and are used in different ways.
shield : float
The current shield value of this unit.
shieldMax : float
The maximum shield value of this unit.
armor : float
The current shield value of this unit.
armorMax : float
The maximum shield value of this unit.
health : float
The current shield value of this unit.
healthMax : float
The maximum shield value of this unit.
energy : float
The current energy value of this unit.
energyMax : float
The maximum energy value of this unit.
stage : float
The current stage value of this unit.
stageStart : float
The starting stage value of this unit.
size : float
The size value of this unit.
monitor : float
A separate value that can be read by MF_FxController. Typically in the range of 0-1.
disableAt : enum DisableTime { Dying, Death, DontDisable }
When this unit is killed, when to disable the object. This can be used to time various fx.
dyingDuration : float
'Dying' is an intermediate stage prior to death. A value here can give time to perform actions or show various effects before being killed.
deathDuration : float
How long to wait before fx are told to end. A small value here will give time for fx to begin.
Hidden Variables
damageID : float
Used to prevent an explosion from damaging the same status script more than once per frame.
fxScript : List <MF_FxController>
A list of fx scripts that have added themselves for referencing. Used so a component script can tell the various fx scripts when a value has changed, and when all fx are finished.
statsScript : List <MF_AbstractStats>
A list of other stats scripts that have added themselves for referencing. Used track when other stats scripts have finished their fx.
poolRefScript : AP_Reference
The AP_Reference script that this object uses to return to its pool.
Public Methods
DoDamage : float ( damage : float )
Applies general damage to stats in order of shield > armor > health. When one stat becomes 0, any remaining damage is applied to the next in line.
DoDamage : float ( damage : float, apply : enum MFnum.StatType )
enum MFnum.StatModType { General, Shield, Armor, Health, Energy }
Applies general damage to a specific stat. Extra damage will not carry over.
DoDamage : float ( damage : float, damType : enum MFnum.DamageType, loc : Vector3, audio : AudioSource,
multS : float, multA : float, multH : float, multE : float, multPen : float, addReduce : float )
enum MFnum.DamageType { General, Kinetic, Explosive, Thermal, Chemical, Energy, Ion }
Applies detailed damage to stats in order of shield > armor > health. When one stat becomes 0, any remaining damage is applied to the next in line. Additional fields can be used for processing more advanced interactions.
DoDamage : float ( damage : float, apply : enum MFnum.StatType, damType : enum MFnum.DamageType,
loc : Vector3, audio : AudioSource, multS : float, multA : float, multH : float, multE : float, multPen : float, addReduce : float )
Applies detailed damage to a specific stat. Extra damage will not carry over. Additional fields can be used for processing more advanced interactions.
ApplyDamage : float ( stat : enum MFnum.StatType, damage : float, apply : enum MFnum.StatType,
damType : enum MFnum.DamageType, loc : Vector3, audio : AudioSource, multS : float, multA : float, multH : float, multE : float,
multPen : float, addReduce : float )
Returns unmodified damage. Intended to be overridden by a script that inherits this to do the actual evaluation.