C# Класс MBParticleSystem, Pharos

Наследование: MBObject
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
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

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

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

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

Метод Описание
OnDisable ( ) : void
OnEnable ( ) : void

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

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

Creates a new empty anchor
public AddAnchor ( ) : MBAnchor,
Результат MBAnchor,

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

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

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

Creates a new empty anchor as a child of parent
public AddAnchor ( MBObject, parent ) : MBAnchor,
parent MBObject, the parent of the new anchor
Результат MBAnchor,

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

Creates a new empty child emitter
public AddEmitter ( ) : MBEmitter
Результат MBEmitter

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

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

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

Creates a new empty emitter as a child of parent
public AddEmitter ( MBObject, parent ) : MBEmitter
parent MBObject, the parent of the new emitter
Результат MBEmitter

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

public AddLayer ( Material mat ) : MBLayer,
mat Material
Результат MBLayer,

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

Clears all particles
public Clear ( ) : void
Результат void

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

Return a layer with matching material or null
public FindLayer ( Material forMaterial ) : MBLayer,
forMaterial Material the Material the layer needs to use
Результат MBLayer,

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

Return a layer with matching shader
public FindLayer ( string shaderName ) : MBLayer,
shaderName string the shader the layer needs to use
Результат MBLayer,

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

Generate a texture atlas containing all textures our emitters need
public GenerateTextureMap ( ) : void
Результат void

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

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

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

Gets the UV of the corresponding texture
public GetTextureUV ( Texture2D texture ) : Rect
texture UnityEngine.Texture2D a Texture from MBImage
Результат Rect

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

Stops all emitters and destroys all particles immediately
public Halt ( ) : void
Результат void

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

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

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

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

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

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

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

Freezes the particle system
public Pause ( ) : void
Результат void

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

Starts playing
public Play ( ) : void
Результат void

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

Starts playing
public Play ( bool pauseAfterTimewarp ) : void
pauseAfterTimewarp bool true to play until Timewarp and then pause
Результат void

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

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

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

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

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

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

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

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

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

Stops all emitters, but continues rendering until all particles died
public Stop ( ) : void
Результат void

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

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

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

public mbAddIdleParticles ( int count ) : void
count int
Результат void

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

public mbBuildDictionary ( bool reload ) : void
reload bool
Результат void

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

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

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

public mbGetParticle ( ) : MBParticle,
Результат MBParticle,

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

public mbIdleParticle ( IEnumerable particles ) : void
particles IEnumerable
Результат void

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

public mbIdleParticle ( MBParticle, particle ) : void
particle MBParticle,
Результат void

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

Gets all textures used by an layer of this particlesystem
public mbLayerTextures ( MBLayer, lyr ) : List
lyr MBLayer,
Результат List

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

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

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

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

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

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

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

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

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

public mbUpdateStep ( bool render ) : void
render bool
Результат void

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

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

Whether this particle system will start playing automatically
public bool AutoPlay
Результат bool

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

The camera used by this ParticleSystem
public Camera Camera
Результат Camera

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

The duration in seconds one loop lasts
public float Duration
Результат float

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

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

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

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

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

How many Particles are created at once when the threshold exceeds
public int ParticleBlocksize
Результат int

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

Initial particle treshold
public int ParticleThreshold
Результат int

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

Pause ParticleSystem after time warping?
Useful to precalculate complex Particlesystems' timewarping. Call Play() again to continue playing
public bool PauseAfterTimeWarp
Результат bool

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

Whether this particle system is persistent between scene changes
public bool Persistent
Результат bool

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

Whether the texture atlas is persistent or generated at Start()
public bool PersistentAtlas
Результат bool

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

Whether this ParticleSystem runs once or repeats playing
public bool SingleShot
Результат bool

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

Texture padding used when packing textures
If you see glitches around your particles, increase texture padding!
public int TexturePadding
Результат int

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

Amount of time Advance the particle system should advance without rendering when starting to play
public float TimeWarp
Результат float

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

Timestep used for TimeWarp.
Using a larger timestep is faster but may lead to incorrect results
public float TimeWarpStepSize
Результат float