public void Close() { IsShowing = false; transform.localScale = Scale; count = (int)Mathf.Round(closeTransition / time); vectorSpeed = Scale / count; CoroutineT.For(RemoveSpeed, count, time, () => gameObject.SetActive(false)).Start(this); }
public void Show() { IsShowing = true; transform.localScale = Vector3.zero; count = (int)Mathf.Round(openTransition / time); vectorSpeed = Scale / count; gameObject.SetActive(true); CoroutineT.For(AddSpeed, count, time).Start(this); }