public static void Add(string text, MethodNoParam callback, GameObject destroyWith = null, bool YSpace = false) { CreateGameObjectIfNeeded(); _items.Add(new Item { Text = text, Callback = callback, GameObject = destroyWith == null ? _gameObject : destroyWith, Separated = YSpace }); }
protected IEnumerator CallAfterTimeCoroutine(MethodNoParam method, float sec) { if (sec > 0) { yield return(new WaitForSeconds(sec)); } method(); }
public static void Remove(MethodNoParam callback) { _items.RemoveAll(x => x.Callback == callback); DeleteGameObjectIfNotNeeded(); }