19 lines
339 B
C#
19 lines
339 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class DespawnObjectUniStorm : MonoBehaviour {
|
|
|
|
public int Seconds = 3;
|
|
|
|
void OnEnable () {
|
|
StartCoroutine(Despawn());
|
|
}
|
|
|
|
IEnumerator Despawn ()
|
|
{
|
|
yield return new WaitForSeconds(Seconds);
|
|
UniStormPool.Despawn(this.gameObject);
|
|
}
|
|
}
|