C# 클래스 MBAnchor, Pharos

Class to create visible hierarchies and emitter pooling within Magical Box
Though any GameObject can be used to group emitters (as long as it's inside a ParticleSystem's child hierarchy), Anchors are shown in the editor window and draw their own gizmo icon. They also include pooling manager capabilities for easy emitter pooling
상속: MBObject
파일 보기 프로젝트 열기: rstaewen/Pharos 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
AllocationBlockSize int
AutoCull bool
AutoDespawn bool
CullingSpeed float
MaxPoolSize int
MinPoolSize int
OnMaxPoolSize MBAnchorPoolExceededMode
PoolingEnabled bool

공개 메소드들

메소드 설명
ClearPool ( ) : void

Remove all instances held by the pool

Cull ( ) : void

Shrink the stock to match MaxPoolSize

Cull ( bool smartCull ) : void

Shrink the stock to match MaxPoolSize

Despawn ( MBEmitter item ) : void

Despawn an item and add it back to the stock

DespawnAll ( ) : void

Despawn all items currently spawned from this pool

IsManaged ( MBEmitter item ) : bool

Whether an item is managed by this pool

IsSpawned ( MBEmitter item ) : bool

Whether an item is spawned by this pool

LateUpdate ( ) : void
Populate ( int no ) : void

Create instances and add them to the stock

PreparePool ( ) : void

Clear all instances and repopulate the pool to match MinPoolSize

Spawn ( ) : MBEmitter

Spawn an instance, make it active and add it to the Spawned list

callbackAutoDespawn ( MBEvent, e ) : void

비공개 메소드들

메소드 설명
AddEmitter ( ) : MBEmitter
AddEmitter ( MBEmitter source ) : MBEmitter
Start ( ) : IEnumerator

메소드 상세

ClearPool() 공개 메소드

Remove all instances held by the pool
public ClearPool ( ) : void
리턴 void

Cull() 공개 메소드

Shrink the stock to match MaxPoolSize
public Cull ( ) : void
리턴 void

Cull() 공개 메소드

Shrink the stock to match MaxPoolSize
public Cull ( bool smartCull ) : void
smartCull bool if true a maximum of AllocationBlockSize items are culled
리턴 void

Despawn() 공개 메소드

Despawn an item and add it back to the stock
public Despawn ( MBEmitter item ) : void
item MBEmitter
리턴 void

DespawnAll() 공개 메소드

Despawn all items currently spawned from this pool
public DespawnAll ( ) : void
리턴 void

IsManaged() 공개 메소드

Whether an item is managed by this pool
public IsManaged ( MBEmitter item ) : bool
item MBEmitter an item
리턴 bool

IsSpawned() 공개 메소드

Whether an item is spawned by this pool
public IsSpawned ( MBEmitter item ) : bool
item MBEmitter an item
리턴 bool

LateUpdate() 공개 메소드

public LateUpdate ( ) : void
리턴 void

Populate() 공개 메소드

Create instances and add them to the stock
public Populate ( int no ) : void
no int
리턴 void

PreparePool() 공개 메소드

Clear all instances and repopulate the pool to match MinPoolSize
public PreparePool ( ) : void
리턴 void

Spawn() 공개 메소드

Spawn an instance, make it active and add it to the Spawned list
public Spawn ( ) : MBEmitter
리턴 MBEmitter

callbackAutoDespawn() 공개 메소드

public callbackAutoDespawn ( MBEvent, e ) : void
e MBEvent,
리턴 void

프로퍼티 상세

AllocationBlockSize 공개적으로 프로퍼티

The number of items processed at once when the pool need to grow or shrink
public int AllocationBlockSize
리턴 int

AutoCull 공개적으로 프로퍼티

Whether the pool should automatically cull items that exceeds MaxPoolSize
public bool AutoCull
리턴 bool

AutoDespawn 공개적으로 프로퍼티

Whether spawned emitters will despawn automatically once they stop playing
public bool AutoDespawn
리턴 bool

CullingSpeed 공개적으로 프로퍼티

Time in seconds between culling actions
public float CullingSpeed
리턴 float

MaxPoolSize 공개적으로 프로퍼티

Maximum number of items int the pool
public int MaxPoolSize
리턴 int

MinPoolSize 공개적으로 프로퍼티

Minimum number of items in the pool
public int MinPoolSize
리턴 int

OnMaxPoolSize 공개적으로 프로퍼티

Determines the behaviour when the pool exceeds MaxPoolSize
public MBAnchorPoolExceededMode OnMaxPoolSize
리턴 MBAnchorPoolExceededMode

PoolingEnabled 공개적으로 프로퍼티

Whether this anchor acts as a pooling manager
public bool PoolingEnabled
리턴 bool