public void unspawn(GameObject obj, float delay, Action cb = null) { UnityUtils.delay(this, () => { unspawn(obj); cb?.Invoke(); }, delay); }
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)); }
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); } }
public override void Awake() { UnityUtils.getComponentByName <Transform>(gameObject, "Item").gameObject.AddComponent <Item>(); base.Awake(); }
protected override void Awake() { base.Awake(); listView = UnityUtils.getComponentByName <Transform>(gameObject, "Content").gameObject.AddComponent <ListView>(); listView.init(this); }
public void close(float delay) { UnityUtils.delay(this, close, delay); }