/// <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)); }
public static void FadeOut(this AudioSource audioSource, float fadeTime) { MonoBehaviourHelper.CreateTemporaryMonoBehaviour(fadeTime).StartCoroutine(FadeOutCoroutine(audioSource, fadeTime)); }