protected virtual void WindowClosed() { this.act_status = CommonDialog.ACT_STATUS.CLOSED; if (this.windowClosedAction != null) { this.windowClosedAction(); } }
public virtual void ClosePanel(bool animation = true) { if (!this.isColliderDisable) { GUICollider.DisableAllCollider("ClosePanel CommonDialog = " + base.gameObject.name); this.isColliderDisable = true; } this.startShow = false; this.endShow = true; if (animation) { this.MakeAnimation(false, this.animeTime, iTween.EaseType.linear); } else { this.MakeAnimation(false, 0f, iTween.EaseType.linear); } this.act_status = CommonDialog.ACT_STATUS.CLOSING; }
protected override void Update() { base.Update(); if (this.startShow) { if (this.isScaled) { float deltaTime = Time.deltaTime; if (this.openWait < 0f) { this._opened = true; this.WindowOpened(); if (this.act_status == CommonDialog.ACT_STATUS.START && this.isColliderDisable) { GUICollider.EnableAllCollider("WindowOpened CommonDialog = " + base.gameObject.name); this.isColliderDisable = false; } this.act_status = CommonDialog.ACT_STATUS.OPEN; this.startShow = false; this.closeDialog = false; } this.openWait -= deltaTime; } } else if (this.endShow) { if (this.isScaled) { base.transform.localPosition = this.startPos; this.HideGUI(); GUIManager.HideCommonDialog(this); if (this.eventList != null) { int num = 0; foreach (GUICollider guicollider in this.touchPanels) { guicollider.onTouchEnded -= this.eventList[num]; num++; } } this.endShow = false; this.closeDialog = true; base.gameObject.SetActive(false); GUIManager.DeleteCommonDialog(this); if (this.finish != null) { if (-1 < this.forceReturnVL) { this.finish(this.forceReturnVL); } else { this.finish(this.returnVal); } } if (this.ClosePanelRecursive) { CommonDialog topDialog = GUIManager.GetTopDialog(this, false); if (topDialog != null && topDialog.CanClosePanelRecursive) { topDialog.ClosePanelRecursive = true; topDialog.ClosePanel(true); } } UnityEngine.Object.Destroy(base.gameObject); if (this.isColliderDisable) { GUICollider.EnableAllCollider("WindowClosed CommonDialog = " + base.gameObject.name); this.isColliderDisable = false; } this.WindowClosed(); if (this.actCallBackLast != null) { this.actCallBackLast(); } } } else if (this.touchPanels.Count == 0 && !this.closeDialog && !this.permanentMode && (GUIManager.someOneTouch || Input.GetKeyDown(KeyCode.Escape))) { global::Debug.Log("touchPanels"); this.OnTouchBegan(default(Touch), default(Vector2)); this.OnTouchEnded(default(Touch), default(Vector2), true); } if (GUIManager.ExtBackKeyReady && Input.GetKeyDown(KeyCode.Escape)) { CommonDialog topDialog2 = GUIManager.GetTopDialog(null, false); if (topDialog2 != null && topDialog2.gameObject.name == base.gameObject.name && this.enableAndroidBackKey && !this.permanentMode && this.act_status == CommonDialog.ACT_STATUS.OPEN && !GUICollider.IsAllColliderDisable()) { this.returnVal = -1; this.ClosePanel(true); SoundMng.Instance().PlaySE("SEInternal/Common/se_106", 0f, false, true, null, -1, 1f); } } }