Ejemplo n.º 1
0
 /// <summary>
 /// Puts the object to the pool after given time.
 /// </summary>
 public void PutObjectAfter(T item, float time)
 {
     //time + 1 because computer must be finished putting the object back to pool and then destroy the MonoBehaviourHelper
     MonoBehaviourHelper.CreateTemporaryMonoBehaviour(time + 1).StartCoroutine(ObjectLifeControllerCoroutine(item, time));
 }
Ejemplo n.º 2
0
 public static void FadeOut(this AudioSource audioSource, float fadeTime)
 {
     MonoBehaviourHelper.CreateTemporaryMonoBehaviour(fadeTime).StartCoroutine(FadeOutCoroutine(audioSource, fadeTime));
 }