C# Класс MBParameter, Pharos

Base class of all parameters
\sa \ref paramref \sa \ref codeextendparameter
Наследование: MBObject
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
AnimatedBirth bool
AnimatedLife bool
DeathReason MBDeathReason
GizmoColor1 Color
GizmoColor2 Color
Order int

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
OnDrawGizmos ( ) : void
OnDrawGizmosSelected ( ) : void

Описание методов

CompareTo() публичный Метод

public CompareTo ( object obj ) : int
obj object
Результат int

Destroy() публичный Метод

public Destroy ( ) : void
Результат void

OnBirth() публичный Метод

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,
Результат void

OnDrawGizmos() защищенный Метод

protected OnDrawGizmos ( ) : void
Результат void

OnDrawGizmosSelected() защищенный Метод

protected OnDrawGizmosSelected ( ) : void
Результат void

OnLifetime() публичный Метод

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,
Результат bool

OnPlay() публичный Метод

Called on each MBEmitter.Play()
Use this to initialize your parameter
public OnPlay ( ) : void
Результат void

Reset() публичный Метод

Restore default settings
Called by the user in the parameter editor
public Reset ( ) : void
Результат void

Validate() публичный Метод

Validate/Check/Limit fields and properties here
This is called by the Editor window after values were changed.
public Validate ( ) : void
Результат void

Описание свойств

AnimatedBirth публичное свойство

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
Результат bool

AnimatedLife публичное свойство

Does this parameter animate particle's over their lifetime?
If true OnLifeTime() will be called every frame the particle exists
public bool AnimatedLife
Результат bool

DeathReason публичное свойство

If this parameter causes the Particle to die (by returning false in OnLifetime()), set the reason here
public MBDeathReason DeathReason
Результат MBDeathReason

GizmoColor1 публичное свойство

Color used by parameter visualization
public Color GizmoColor1
Результат Color

GizmoColor2 публичное свойство

Color used by parameter visualization
public Color GizmoColor2
Результат Color

Order публичное свойство

Determines the order of execution
Parameters are applied in increasing Order. \sa \ref paramorder
public int Order
Результат int