C# Class MBParameter, Pharos

Base class of all parameters
\sa \ref paramref \sa \ref codeextendparameter
Inheritance: MBObject
Mostra file Open project: rstaewen/Pharos

Public Properties

Property Type Description
AnimatedBirth bool
AnimatedLife bool
DeathReason MBDeathReason
GizmoColor1 Color
GizmoColor2 Color
Order int

Public Methods

Method Description
CompareTo ( object obj ) : int
Destroy ( ) : void
OnBirth ( MBParticle, PT ) : void

Sets a particle's initial parameters

This is called once on particle's birth. If AnimatedBirth is true you should animate values here (use PT.DeltaTime and PT.Emitter.AgePercent)

OnLifetime ( MBParticle, PT ) : bool

Change particle values over its lifetime

This is called each frame a particle exists. You should animate values using PT.AgePercent and PT.DeltaTime

OnPlay ( ) : void

Called on each MBEmitter.Play()

Use this to initialize your parameter

Reset ( ) : void

Restore default settings

Called by the user in the parameter editor

Validate ( ) : void

Validate/Check/Limit fields and properties here

This is called by the Editor window after values were changed.

Protected Methods

Method Description
OnDrawGizmos ( ) : void
OnDrawGizmosSelected ( ) : void

Method Details

CompareTo() public method

public CompareTo ( object obj ) : int
obj object
return int

Destroy() public method

public Destroy ( ) : void
return void

OnBirth() public method

Sets a particle's initial parameters
This is called once on particle's birth. If AnimatedBirth is true you should animate values here (use PT.DeltaTime and PT.Emitter.AgePercent)
public OnBirth ( MBParticle, PT ) : void
PT MBParticle,
return void

OnDrawGizmos() protected method

protected OnDrawGizmos ( ) : void
return void

OnDrawGizmosSelected() protected method

protected OnDrawGizmosSelected ( ) : void
return void

OnLifetime() public method

Change particle values over its lifetime
This is called each frame a particle exists. You should animate values using PT.AgePercent and PT.DeltaTime
public OnLifetime ( MBParticle, PT ) : bool
PT MBParticle,
return bool

OnPlay() public method

Called on each MBEmitter.Play()
Use this to initialize your parameter
public OnPlay ( ) : void
return void

Reset() public method

Restore default settings
Called by the user in the parameter editor
public Reset ( ) : void
return void

Validate() public method

Validate/Check/Limit fields and properties here
This is called by the Editor window after values were changed.
public Validate ( ) : void
return void

Property Details

AnimatedBirth public_oe property

Is this parameter animated over the emitter's duration?
Check this flag to determine if you need to handle curves or static values in OnBirth()
public bool AnimatedBirth
return bool

AnimatedLife public_oe property

Does this parameter animate particle's over their lifetime?
If true OnLifeTime() will be called every frame the particle exists
public bool AnimatedLife
return bool

DeathReason public_oe property

If this parameter causes the Particle to die (by returning false in OnLifetime()), set the reason here
public MBDeathReason DeathReason
return MBDeathReason

GizmoColor1 public_oe property

Color used by parameter visualization
public Color GizmoColor1
return Color

GizmoColor2 public_oe property

Color used by parameter visualization
public Color GizmoColor2
return Color

Order public_oe property

Determines the order of execution
Parameters are applied in increasing Order. \sa \ref paramorder
public int Order
return int