C# Class MBEmitterType, Pharos

Base emitte type class
\sa \ref emtyperef \sa \ref codeextendemtype
Inheritance: MBObject
Datei anzeigen Open project: rstaewen/Pharos

Public Properties

Property Type Description
FitScreenHeight bool
FitScreenWidth bool
FixedHeading Vector3
FixedHeadingIsGlobal bool
GizmoColor1 Color
GizmoColor2 Color
GizmoColor3 Color
Heading MBEmitterTypeHeading
HeadingArc float
InverseHeading bool

Public Methods

Method Description
GetHeading ( MBParticle, PT ) : Vector3

Gets the initial heading of the new particle

GetPosition ( MBParticle, PT ) : Vector3

Gets a point inside the shape of this Emittertype

This is called by the emitter to get a spawn point for a new particle

OnDestroy ( ) : void
OnPlay ( ) : void

Called when the emitter starts playing

Override this to initialize an EmitterType

Reset ( ) : void

Resets to default values

ScaleToFitScreen ( ) : void

Scales the emitter to fit the viewport dimensions using ParticleSystem's Camera

This is useful for 2D emitters like MBRectEmitter

ScaleToFitScreen ( bool scaleX, bool scaleY ) : void

Scales the emitter to fit the viewport dimensions using ParticleSystem's Camera

Validate ( ) : void

Validate/Check/Limit fields and properties here

This is called by the editor after values were changed by the user.

mbReloadHierarchy ( ) : void

Protected Methods

Method Description
DoGizmos ( ) : void

Gizmo drawing method, called by OnDrawGizmos and OnDrawGizmosSelected. Place your gizmo code here!

Gizmo-Visibility will be set by the user in the editor

OnDrawGizmos ( ) : void
OnDrawGizmosSelected ( ) : void

Method Details

DoGizmos() protected method

Gizmo drawing method, called by OnDrawGizmos and OnDrawGizmosSelected. Place your gizmo code here!
Gizmo-Visibility will be set by the user in the editor
protected DoGizmos ( ) : void
return void

GetHeading() public method

Gets the initial heading of the new particle
public GetHeading ( MBParticle, PT ) : Vector3
PT MBParticle, The new Particle with its position already set
return Vector3

GetPosition() public method

Gets a point inside the shape of this Emittertype
This is called by the emitter to get a spawn point for a new particle
public GetPosition ( MBParticle, PT ) : Vector3
PT MBParticle, The new particle. Usually this isn't needed
return Vector3

OnDestroy() public method

public OnDestroy ( ) : void
return void

OnDrawGizmos() protected method

protected OnDrawGizmos ( ) : void
return void

OnDrawGizmosSelected() protected method

protected OnDrawGizmosSelected ( ) : void
return void

OnPlay() public method

Called when the emitter starts playing
Override this to initialize an EmitterType
public OnPlay ( ) : void
return void

Reset() public method

Resets to default values
public Reset ( ) : void
return void

ScaleToFitScreen() public method

Scales the emitter to fit the viewport dimensions using ParticleSystem's Camera
This is useful for 2D emitters like MBRectEmitter
public ScaleToFitScreen ( ) : void
return void

ScaleToFitScreen() public method

Scales the emitter to fit the viewport dimensions using ParticleSystem's Camera
public ScaleToFitScreen ( bool scaleX, bool scaleY ) : void
scaleX bool True to scale the x axis
scaleY bool True to scale the y axis
return void

Validate() public method

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

mbReloadHierarchy() public method

public mbReloadHierarchy ( ) : void
return void

Property Details

FitScreenHeight public_oe property

Whether the emitter type scales the y-axis to fit into viewport on play
public bool FitScreenHeight
return bool

FitScreenWidth public_oe property

Whether the emitter type scales the x-axis to fit into viewport on play
public bool FitScreenWidth
return bool

FixedHeading public_oe property

Heading vector used when Heading is set to MBEmitterTypeHeading.Fixed
public Vector3 FixedHeading
return Vector3

FixedHeadingIsGlobal public_oe property

Whether Fixed takes emitter rotation into account or not
public bool FixedHeadingIsGlobal
return bool

GizmoColor1 public_oe property

Color used by EmitterType visualization
public Color GizmoColor1
return Color

GizmoColor2 public_oe property

Color used by EmitterType visualization;
public Color GizmoColor2
return Color

GizmoColor3 public_oe property

Color used by EmitterType visualization;
public Color GizmoColor3
return Color

Heading public_oe property

The initial heading of emitted particles
public MBEmitterTypeHeading Heading
return MBEmitterTypeHeading

HeadingArc public_oe property

Heading arc used for several heading modes
public float HeadingArc
return float

InverseHeading public_oe property

Whether the initial heading will be inversed
public bool InverseHeading
return bool