public void Remove() { //Destroy( this.gameObject ); ObjectPool.Recycle(this.gameObject); if (this.HideEvent != null) { this.HideEvent(this, this.mState); } if (this.hideCallback != null) { this.hideCallback(this, this.mState); } this.ShowedEvent = null; this.HideEvent = null; this.hideCallback = null; }
public void Dispose() { this.ShowedEvent = null; this.HideEvent = null; this.hideCallback = null; }
public static void Show(GameObject go, bool isModal, Dialog.DialogCloseDelegate closeCallback, Dialog.DialogShowedDelegate showCallback) { if (go == null) { return; } UIDialogView dialog = go.GetComponent <UIDialogView>(); if (dialog == null) { dialog = go.AddComponent <UIDialogView>(); } if (closeCallback != null) { dialog.hideCallback += closeCallback; } if (showCallback != null) { dialog.ShowedEvent += showCallback; } dialog.mIsModal = isModal; if (Dialog.mNextDialog != null) { Dialog.mNextDialog.Remove(); Dialog.mNextDialog = null; } Dialog.mNextDialog = dialog; Hide(DialogState.OK, delegate { ShowEx(); }); }