private IEnumerator Begin(Timer.NullDelegate method, float time) { yield return(new WaitForSeconds(time)); method(); Destroy(gameObject); }
public void New(Timer.NullDelegate method, float seconds, bool start) { this.seconds = seconds; this.method = method; if (start) { //method(); StartCoroutine(Begin(method, seconds)); } }