MF_FxController
Controls various fx such as a GameObject enabled state, ParticleSystems, TrailRenderes, AudioSources, and LensFlares using an MF_LensFlare script.
Individual fx can react to various fields of MF_AbstractStats, and additionally, the monitor fields of MF_B_Projectile, MF_AbstractMobility, and MF_AbstractComponent.
MF_FxController should be placed on a child object of the object with script it will be monitoring.
Public Variables
detachAt : DetachTime enum { ScriptDisable, Dying, Death, DontDetach }
Determines when to detach the controller from the object. This will allow fx to run while the original parent object is disabled.
ScriptDisable will match when the linked script is disabled.
transferMotion : bool
If a Rigidbody is attached, and the parent has a Rigidbody, the parent motion and Rigidbody properties will be matched when the controller is detached.
fxList : FxItem[]
Public Class FxItem
obj : GameObject
A prefab or GameObject holding an fx item to be controlled.
location : Transform
An optional parent object of the fx. If left blank, location will be the parent of the fx. If there is no parent, such as a prefab, location will become this controller's object.
Fx will take on the position, and rotation of the location object. And fx such as ParticleSystems or MF_LensFlares can scale by the scale in the hierarchy.
active : FxState enum { Alive, Dying, Dead, Shield, Armor, Health, Energy, Monitor, Stage, Trigger }
The value to compare. If the result is true, the fx on obj will be active.
op : FxOp enum { Equals, LessThan, MoreThan, LessEqual, MoreEqual, Decreases, Increases, Changes }
When comparing some values of active, use this operator against percent.
active values compared: Shield, Armor, Health, Energy, Monitor, and Stage.
(LessEqual and MoreEqual are shorthand for "less than or equal" and "more than or equal", respectively.)
percent : float
A value to compare some values of active against, expressed in a percentage form, typically from 0-1. However, Stage is any int.
active values compared: Shield, Armor, Health, Energy, Monitor, and Stage.
alive : bool
An additional parameter requiring the unit be alive for this fx to be active.
once : bool
Will only allow the fx to run one time.
sendValue : bool
Will send the read value of active and apply it to the fx.
Only used for active values: Shield, Armor, Health, Energy, and Monitor. Applies differently for different fx types:
ParticleSystem: Multiplier for startSize, emission rateOverTime, and rateOverDistance.
TrailRenderer: Multiplier for time.
AudioSource: Multiplier for volume.
MF_LensFlare: Used by the multiplier field to control brightness.
invertValue : bool
When sending a value, will invert the value sent to an fx.
Only used for active values: Shield, Armor, Health, Energy, and Monitor.
duration : bool
Will place additional restrictions on the duration of an fx.
minTime : float
When this fx begins, it will be active for a minimum amount of time.
maxTime : float
Once begun, this fx will only be active for a maximum amount of time. Time is separate each time the fx is begun.
Controls various fx such as a GameObject enabled state, ParticleSystems, TrailRenderes, AudioSources, and LensFlares using an MF_LensFlare script.
Individual fx can react to various fields of MF_AbstractStats, and additionally, the monitor fields of MF_B_Projectile, MF_AbstractMobility, and MF_AbstractComponent.
MF_FxController should be placed on a child object of the object with script it will be monitoring.
Public Variables
detachAt : DetachTime enum { ScriptDisable, Dying, Death, DontDetach }
Determines when to detach the controller from the object. This will allow fx to run while the original parent object is disabled.
ScriptDisable will match when the linked script is disabled.
transferMotion : bool
If a Rigidbody is attached, and the parent has a Rigidbody, the parent motion and Rigidbody properties will be matched when the controller is detached.
fxList : FxItem[]
Public Class FxItem
obj : GameObject
A prefab or GameObject holding an fx item to be controlled.
location : Transform
An optional parent object of the fx. If left blank, location will be the parent of the fx. If there is no parent, such as a prefab, location will become this controller's object.
Fx will take on the position, and rotation of the location object. And fx such as ParticleSystems or MF_LensFlares can scale by the scale in the hierarchy.
active : FxState enum { Alive, Dying, Dead, Shield, Armor, Health, Energy, Monitor, Stage, Trigger }
The value to compare. If the result is true, the fx on obj will be active.
op : FxOp enum { Equals, LessThan, MoreThan, LessEqual, MoreEqual, Decreases, Increases, Changes }
When comparing some values of active, use this operator against percent.
active values compared: Shield, Armor, Health, Energy, Monitor, and Stage.
(LessEqual and MoreEqual are shorthand for "less than or equal" and "more than or equal", respectively.)
percent : float
A value to compare some values of active against, expressed in a percentage form, typically from 0-1. However, Stage is any int.
active values compared: Shield, Armor, Health, Energy, Monitor, and Stage.
alive : bool
An additional parameter requiring the unit be alive for this fx to be active.
once : bool
Will only allow the fx to run one time.
sendValue : bool
Will send the read value of active and apply it to the fx.
Only used for active values: Shield, Armor, Health, Energy, and Monitor. Applies differently for different fx types:
ParticleSystem: Multiplier for startSize, emission rateOverTime, and rateOverDistance.
TrailRenderer: Multiplier for time.
AudioSource: Multiplier for volume.
MF_LensFlare: Used by the multiplier field to control brightness.
invertValue : bool
When sending a value, will invert the value sent to an fx.
Only used for active values: Shield, Armor, Health, Energy, and Monitor.
duration : bool
Will place additional restrictions on the duration of an fx.
minTime : float
When this fx begins, it will be active for a minimum amount of time.
maxTime : float
Once begun, this fx will only be active for a maximum amount of time. Time is separate each time the fx is begun.