Example #1
0
 public void unspawn(GameObject obj, float delay, Action cb = null)
 {
     UnityUtils.delay(this, () => {
         unspawn(obj);
         cb?.Invoke();
     }, delay);
 }
Example #2
0
 public void run()
 {
     img.fillAmount = 1;
     StartCoroutine(UnityUtils.leap <Image>(img, i => {
         return(i.fillAmount > 0);
     }, i => {
         i.fillAmount -= ((float)1 / (float)20);
     }, 0.25f));
 }
Example #3
0
 public void show(OverlayBoxBundle b)
 {
     if (followCoroutine != null)
     {
         StopCoroutine(followCoroutine);
     }
     gameObject.SetActive(true);
     if (!b.followTram)
     {
         rectT.position = b.getPosition() + b.setting.shiftPos;
     }
     else
     {
         rectT.position  = b.getPosition() + b.setting.shiftPos;
         followCoroutine = UnityUtils.loop(this, () => {
             rectT.position = b.getPosition() + b.setting.shiftPos;
         }, 0, b.setting.followInterval);
     }
 }
Example #4
0
 public override void Awake()
 {
     UnityUtils.getComponentByName <Transform>(gameObject, "Item").gameObject.AddComponent <Item>();
     base.Awake();
 }
Example #5
0
 protected override void Awake()
 {
     base.Awake();
     listView = UnityUtils.getComponentByName <Transform>(gameObject, "Content").gameObject.AddComponent <ListView>();
     listView.init(this);
 }
Example #6
0
 public void close(float delay)
 {
     UnityUtils.delay(this, close, delay);
 }