Exemple #1
0
 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
     });
 }
Exemple #2
0
 protected IEnumerator CallAfterTimeCoroutine(MethodNoParam method, float sec)
 {
     if (sec > 0)
     {
         yield return(new WaitForSeconds(sec));
     }
     method();
 }
Exemple #3
0
 public static void Remove(MethodNoParam callback)
 {
     _items.RemoveAll(x => x.Callback == callback);
     DeleteGameObjectIfNotNeeded();
 }