C# Class SimplePM.SpawnPool

Inheritance: UnityEngine.MonoBehaviour
Exibir arquivo Open project: woshihuo12/UnityHello Class Usage Examples

Public Properties

Property Type Description
destroyDelegates DestroyDelegate
instantiateDelegates InstantiateDelegate

Public Methods

Method Description
Add ( Transform inst, string prefabName, bool despawn, bool parent ) : void
CreatePrefabPool ( PrefabPool prefabPool ) : void
Despawn ( Transform instance ) : void
Despawn ( Transform inst, Transform parent ) : void
Despawn ( Transform instance, float seconds ) : void
Despawn ( Transform instance, float seconds, Transform parent ) : void
DespawnAll ( ) : void
GetPrefab ( GameObject instance ) : GameObject
GetPrefab ( Transform instance ) : Transform
GetPrefabPool ( GameObject prefab ) : PrefabPool
GetPrefabPool ( Transform prefab ) : PrefabPool
IsSpawned ( Transform instance ) : bool
Spawn ( AudioSource prefab ) : AudioSource
Spawn ( AudioSource prefab, Transform parent ) : AudioSource
Spawn ( AudioSource prefab, Vector3 pos, Quaternion rot ) : AudioSource
Spawn ( AudioSource prefab, Vector3 pos, Quaternion rot, Transform parent ) : AudioSource
Spawn ( ParticleEmitter prefab, Vector3 pos, Quaternion rot ) : ParticleEmitter
Spawn ( ParticleEmitter prefab, Vector3 pos, Quaternion rot, string colorPropertyName, Color color ) : ParticleEmitter
Spawn ( ParticleSystem prefab, Vector3 pos, Quaternion rot ) : ParticleSystem
Spawn ( ParticleSystem prefab, Vector3 pos, Quaternion rot, Transform parent ) : ParticleSystem
Spawn ( GameObject prefab ) : Transform
Spawn ( GameObject prefab, Transform parent ) : Transform
Spawn ( GameObject prefab, Vector3 pos, Quaternion rot ) : Transform
Spawn ( GameObject prefab, Vector3 pos, Quaternion rot, Transform parent ) : Transform
Spawn ( Transform prefab ) : Transform
Spawn ( Transform prefab, Transform parent ) : Transform
Spawn ( Transform prefab, Vector3 pos, Quaternion rot ) : Transform
Spawn ( Transform prefab, Vector3 pos, Quaternion rot, Transform parent ) : Transform
Spawn ( string prefabName ) : Transform
Spawn ( string prefabName, Transform parent ) : Transform
Spawn ( string prefabName, Vector3 pos, Quaternion rot ) : Transform
Spawn ( string prefabName, Vector3 pos, Quaternion rot, Transform parent ) : Transform

Private Methods

Method Description
Awake ( ) : void
DestroyInstance ( GameObject instance ) : void
DoDespawnAfterSeconds ( Transform instance, float seconds, bool useParent, Transform parent ) : IEnumerator
InstantiatePrefab ( GameObject prefab, Vector3 pos, Quaternion rot ) : GameObject
ListForAudioStop ( AudioSource src ) : IEnumerator
ListenForEmitDespawn ( ParticleEmitter emitter ) : IEnumerator
ListenForEmitDespawn ( ParticleSystem emitter ) : IEnumerator
OnDestroy ( ) : void

Method Details

Add() public method

public Add ( Transform inst, string prefabName, bool despawn, bool parent ) : void
inst UnityEngine.Transform
prefabName string
despawn bool
parent bool
return void

CreatePrefabPool() public method

public CreatePrefabPool ( PrefabPool prefabPool ) : void
prefabPool PrefabPool
return void

Despawn() public method

public Despawn ( Transform instance ) : void
instance UnityEngine.Transform
return void

Despawn() public method

public Despawn ( Transform inst, Transform parent ) : void
inst UnityEngine.Transform
parent UnityEngine.Transform
return void

Despawn() public method

public Despawn ( Transform instance, float seconds ) : void
instance UnityEngine.Transform
seconds float
return void

Despawn() public method

public Despawn ( Transform instance, float seconds, Transform parent ) : void
instance UnityEngine.Transform
seconds float
parent UnityEngine.Transform
return void

DespawnAll() public method

public DespawnAll ( ) : void
return void

GetPrefab() public method

public GetPrefab ( GameObject instance ) : GameObject
instance UnityEngine.GameObject
return UnityEngine.GameObject

GetPrefab() public method

public GetPrefab ( Transform instance ) : Transform
instance UnityEngine.Transform
return UnityEngine.Transform

GetPrefabPool() public method

public GetPrefabPool ( GameObject prefab ) : PrefabPool
prefab UnityEngine.GameObject
return PrefabPool

GetPrefabPool() public method

public GetPrefabPool ( Transform prefab ) : PrefabPool
prefab UnityEngine.Transform
return PrefabPool

IsSpawned() public method

public IsSpawned ( Transform instance ) : bool
instance UnityEngine.Transform
return bool

Spawn() public method

public Spawn ( AudioSource prefab ) : AudioSource
prefab UnityEngine.AudioSource
return UnityEngine.AudioSource

Spawn() public method

public Spawn ( AudioSource prefab, Transform parent ) : AudioSource
prefab UnityEngine.AudioSource
parent UnityEngine.Transform
return UnityEngine.AudioSource

Spawn() public method

public Spawn ( AudioSource prefab, Vector3 pos, Quaternion rot ) : AudioSource
prefab UnityEngine.AudioSource
pos UnityEngine.Vector3
rot UnityEngine.Quaternion
return UnityEngine.AudioSource

Spawn() public method

public Spawn ( AudioSource prefab, Vector3 pos, Quaternion rot, Transform parent ) : AudioSource
prefab UnityEngine.AudioSource
pos UnityEngine.Vector3
rot UnityEngine.Quaternion
parent UnityEngine.Transform
return UnityEngine.AudioSource

Spawn() public method

public Spawn ( ParticleEmitter prefab, Vector3 pos, Quaternion rot ) : ParticleEmitter
prefab UnityEngine.ParticleEmitter
pos UnityEngine.Vector3
rot UnityEngine.Quaternion
return UnityEngine.ParticleEmitter

Spawn() public method

public Spawn ( ParticleEmitter prefab, Vector3 pos, Quaternion rot, string colorPropertyName, Color color ) : ParticleEmitter
prefab UnityEngine.ParticleEmitter
pos UnityEngine.Vector3
rot UnityEngine.Quaternion
colorPropertyName string
color UnityEngine.Color
return UnityEngine.ParticleEmitter

Spawn() public method

public Spawn ( ParticleSystem prefab, Vector3 pos, Quaternion rot ) : ParticleSystem
prefab UnityEngine.ParticleSystem
pos UnityEngine.Vector3
rot UnityEngine.Quaternion
return UnityEngine.ParticleSystem

Spawn() public method

public Spawn ( ParticleSystem prefab, Vector3 pos, Quaternion rot, Transform parent ) : ParticleSystem
prefab UnityEngine.ParticleSystem
pos UnityEngine.Vector3
rot UnityEngine.Quaternion
parent UnityEngine.Transform
return UnityEngine.ParticleSystem

Spawn() public method

public Spawn ( GameObject prefab ) : Transform
prefab UnityEngine.GameObject
return UnityEngine.Transform

Spawn() public method

public Spawn ( GameObject prefab, Transform parent ) : Transform
prefab UnityEngine.GameObject
parent UnityEngine.Transform
return UnityEngine.Transform

Spawn() public method

public Spawn ( GameObject prefab, Vector3 pos, Quaternion rot ) : Transform
prefab UnityEngine.GameObject
pos UnityEngine.Vector3
rot UnityEngine.Quaternion
return UnityEngine.Transform

Spawn() public method

public Spawn ( GameObject prefab, Vector3 pos, Quaternion rot, Transform parent ) : Transform
prefab UnityEngine.GameObject
pos UnityEngine.Vector3
rot UnityEngine.Quaternion
parent UnityEngine.Transform
return UnityEngine.Transform

Spawn() public method

public Spawn ( Transform prefab ) : Transform
prefab UnityEngine.Transform
return UnityEngine.Transform

Spawn() public method

public Spawn ( Transform prefab, Transform parent ) : Transform
prefab UnityEngine.Transform
parent UnityEngine.Transform
return UnityEngine.Transform

Spawn() public method

public Spawn ( Transform prefab, Vector3 pos, Quaternion rot ) : Transform
prefab UnityEngine.Transform
pos UnityEngine.Vector3
rot UnityEngine.Quaternion
return UnityEngine.Transform

Spawn() public method

public Spawn ( Transform prefab, Vector3 pos, Quaternion rot, Transform parent ) : Transform
prefab UnityEngine.Transform
pos UnityEngine.Vector3
rot UnityEngine.Quaternion
parent UnityEngine.Transform
return UnityEngine.Transform

Spawn() public method

public Spawn ( string prefabName ) : Transform
prefabName string
return UnityEngine.Transform

Spawn() public method

public Spawn ( string prefabName, Transform parent ) : Transform
prefabName string
parent UnityEngine.Transform
return UnityEngine.Transform

Spawn() public method

public Spawn ( string prefabName, Vector3 pos, Quaternion rot ) : Transform
prefabName string
pos UnityEngine.Vector3
rot UnityEngine.Quaternion
return UnityEngine.Transform

Spawn() public method

public Spawn ( string prefabName, Vector3 pos, Quaternion rot, Transform parent ) : Transform
prefabName string
pos UnityEngine.Vector3
rot UnityEngine.Quaternion
parent UnityEngine.Transform
return UnityEngine.Transform

Property Details

destroyDelegates public_oe property

public DestroyDelegate destroyDelegates
return DestroyDelegate

instantiateDelegates public_oe property

public InstantiateDelegate instantiateDelegates
return InstantiateDelegate