public static void Open(int stageID, CallBackOnClosed callback) { if (!instance.gameObject.activeSelf) { instance.gameObject.SetActive(true); instance.open(stageID, callback); } }
private void open(int stageID, CallBackOnClosed callback) { this.stageID = stageID; this.TMPro_stageID.text = stageID.ToString(); DOTween.Kill(this.GetComponent <RectTransform>()); this.GetComponent <RectTransform>().DOLocalMoveX(0, 0.2f); this.callback = callback; Invoke("enableMe", 0.2f); }