C# Class MBParticleSystem, Pharos

Inheritance: MBObject
Mostrar archivo Open project: rstaewen/Pharos Class Usage Examples

Public Properties

Property Type Description
AutoPlay bool
Camera Camera
Duration float
Infinite bool
Invisible bool
ParticleBlocksize int
ParticleThreshold int
PauseAfterTimeWarp bool
Persistent bool
PersistentAtlas bool
SingleShot bool
TexturePadding int
TimeWarp float
TimeWarpStepSize float

Public Methods

Method Description
AddAnchor ( ) : MBAnchor,

Creates a new empty anchor

AddAnchor ( MBAnchor, source, MBObject, parent ) : MBAnchor,

Creates a clone of an existing anchor and adds it as a child of source

AddAnchor ( MBObject, parent ) : MBAnchor,

Creates a new empty anchor as a child of parent

AddEmitter ( ) : MBEmitter

Creates a new empty child emitter

AddEmitter ( MBEmitter source, MBObject, parent ) : MBEmitter

Creates a clone of an existing emitter and adds it as a child of source

AddEmitter ( MBObject, parent ) : MBEmitter

Creates a new empty emitter as a child of parent

AddLayer ( Material mat ) : MBLayer,
Clear ( ) : void

Clears all particles

FindLayer ( Material forMaterial ) : MBLayer,

Return a layer with matching material or null

FindLayer ( string shaderName ) : MBLayer,

Return a layer with matching shader

GenerateTextureMap ( ) : void

Generate a texture atlas containing all textures our emitters need

GenerateTextureMap ( bool forceRebuild ) : void

Generate a texture atlas containing all textures our emitters need

GetTextureUV ( Texture2D texture ) : Rect

Gets the UV of the corresponding texture

Halt ( ) : void

Stops all emitters and destroys all particles immediately

LateUpdate ( ) : void
Pause ( ) : void

Freezes the particle system

Play ( ) : void

Starts playing

Play ( bool pauseAfterTimewarp ) : void

Starts playing

Purge ( ) : void
Reset ( ) : void
SetTextureAtlas ( string path ) : void

Set the filename that this particle system uses to write it's texture atlas

Start ( ) : void
Stop ( ) : void

Stops all emitters, but continues rendering until all particles died

Update ( ) : void
mbAddIdleParticles ( int count ) : void
mbBuildDictionary ( bool reload ) : void
mbCalculateRuntime ( ) : void
mbGetParticle ( ) : MBParticle,
mbIdleParticle ( IEnumerable particles ) : void
mbIdleParticle ( MBParticle, particle ) : void
mbLayerTextures ( MBLayer, lyr ) : List

Gets all textures used by an layer of this particlesystem

mbReloadHierarchy ( ) : void
mbRender ( ) : void
mbResetBuffers ( ) : void
mbUpdate ( ) : void
mbUpdateStep ( bool render ) : void

Protected Methods

Method Description
OnDisable ( ) : void
OnEnable ( ) : void

Method Details

AddAnchor() public method

Creates a new empty anchor
public AddAnchor ( ) : MBAnchor,
return MBAnchor,

AddAnchor() public method

Creates a clone of an existing anchor and adds it as a child of source
public AddAnchor ( MBAnchor, source, MBObject, parent ) : MBAnchor,
source MBAnchor, the anchor to be cloned
parent MBObject, the new parent of the clone
return MBAnchor,

AddAnchor() public method

Creates a new empty anchor as a child of parent
public AddAnchor ( MBObject, parent ) : MBAnchor,
parent MBObject, the parent of the new anchor
return MBAnchor,

AddEmitter() public method

Creates a new empty child emitter
public AddEmitter ( ) : MBEmitter
return MBEmitter

AddEmitter() public method

Creates a clone of an existing emitter and adds it as a child of source
public AddEmitter ( MBEmitter source, MBObject, parent ) : MBEmitter
source MBEmitter the emitter to be cloned
parent MBObject, the parent of the new emitter
return MBEmitter

AddEmitter() public method

Creates a new empty emitter as a child of parent
public AddEmitter ( MBObject, parent ) : MBEmitter
parent MBObject, the parent of the new emitter
return MBEmitter

AddLayer() public method

public AddLayer ( Material mat ) : MBLayer,
mat Material
return MBLayer,

Clear() public method

Clears all particles
public Clear ( ) : void
return void

FindLayer() public method

Return a layer with matching material or null
public FindLayer ( Material forMaterial ) : MBLayer,
forMaterial Material the Material the layer needs to use
return MBLayer,

FindLayer() public method

Return a layer with matching shader
public FindLayer ( string shaderName ) : MBLayer,
shaderName string the shader the layer needs to use
return MBLayer,

GenerateTextureMap() public method

Generate a texture atlas containing all textures our emitters need
public GenerateTextureMap ( ) : void
return void

GenerateTextureMap() public method

Generate a texture atlas containing all textures our emitters need
public GenerateTextureMap ( bool forceRebuild ) : void
forceRebuild bool if set to false, atlas will only be built if a texture is missing
return void

GetTextureUV() public method

Gets the UV of the corresponding texture
public GetTextureUV ( Texture2D texture ) : Rect
texture UnityEngine.Texture2D a Texture from MBImage
return Rect

Halt() public method

Stops all emitters and destroys all particles immediately
public Halt ( ) : void
return void

LateUpdate() public method

public LateUpdate ( ) : void
return void

OnDisable() protected method

protected OnDisable ( ) : void
return void

OnEnable() protected method

protected OnEnable ( ) : void
return void

Pause() public method

Freezes the particle system
public Pause ( ) : void
return void

Play() public method

Starts playing
public Play ( ) : void
return void

Play() public method

Starts playing
public Play ( bool pauseAfterTimewarp ) : void
pauseAfterTimewarp bool true to play until Timewarp and then pause
return void

Purge() public method

public Purge ( ) : void
return void

Reset() public method

public Reset ( ) : void
return void

SetTextureAtlas() public method

Set the filename that this particle system uses to write it's texture atlas
public SetTextureAtlas ( string path ) : void
path string path to a .png file, e.g. "assets/myparticlesys.png"
return void

Start() public method

public Start ( ) : void
return void

Stop() public method

Stops all emitters, but continues rendering until all particles died
public Stop ( ) : void
return void

Update() public method

public Update ( ) : void
return void

mbAddIdleParticles() public method

public mbAddIdleParticles ( int count ) : void
count int
return void

mbBuildDictionary() public method

public mbBuildDictionary ( bool reload ) : void
reload bool
return void

mbCalculateRuntime() public method

public mbCalculateRuntime ( ) : void
return void

mbGetParticle() public method

public mbGetParticle ( ) : MBParticle,
return MBParticle,

mbIdleParticle() public method

public mbIdleParticle ( IEnumerable particles ) : void
particles IEnumerable
return void

mbIdleParticle() public method

public mbIdleParticle ( MBParticle, particle ) : void
particle MBParticle,
return void

mbLayerTextures() public method

Gets all textures used by an layer of this particlesystem
public mbLayerTextures ( MBLayer, lyr ) : List
lyr MBLayer,
return List

mbReloadHierarchy() public method

public mbReloadHierarchy ( ) : void
return void

mbRender() public method

public mbRender ( ) : void
return void

mbResetBuffers() public method

public mbResetBuffers ( ) : void
return void

mbUpdate() public method

public mbUpdate ( ) : void
return void

mbUpdateStep() public method

public mbUpdateStep ( bool render ) : void
render bool
return void

Property Details

AutoPlay public_oe property

Whether this particle system will start playing automatically
public bool AutoPlay
return bool

Camera public_oe property

The camera used by this ParticleSystem
public Camera Camera
return Camera

Duration public_oe property

The duration in seconds one loop lasts
public float Duration
return float

Infinite public_oe property

Whether this ParticleSystem has infinite duration
This is useful if you play single emitter instead of the whole ParticleSystem. \note Note that in Infinite mode AgePercent is always 0.5 while Age is undefined.
public bool Infinite
return bool

Invisible public_oe property

Whether this particle system renders particles?
Unlike a muted system all emitters will be calculated and only the rendering will be suppressed.
public bool Invisible
return bool

ParticleBlocksize public_oe property

How many Particles are created at once when the threshold exceeds
public int ParticleBlocksize
return int

ParticleThreshold public_oe property

Initial particle treshold
public int ParticleThreshold
return int

PauseAfterTimeWarp public_oe property

Pause ParticleSystem after time warping?
Useful to precalculate complex Particlesystems' timewarping. Call Play() again to continue playing
public bool PauseAfterTimeWarp
return bool

Persistent public_oe property

Whether this particle system is persistent between scene changes
public bool Persistent
return bool

PersistentAtlas public_oe property

Whether the texture atlas is persistent or generated at Start()
public bool PersistentAtlas
return bool

SingleShot public_oe property

Whether this ParticleSystem runs once or repeats playing
public bool SingleShot
return bool

TexturePadding public_oe property

Texture padding used when packing textures
If you see glitches around your particles, increase texture padding!
public int TexturePadding
return int

TimeWarp public_oe property

Amount of time Advance the particle system should advance without rendering when starting to play
public float TimeWarp
return float

TimeWarpStepSize public_oe property

Timestep used for TimeWarp.
Using a larger timestep is faster but may lead to incorrect results
public float TimeWarpStepSize
return float