public void OpenDialog(int ShowMessageNo, DialogAnimation.AnimType type = DialogAnimation.AnimType.POPUP) { for (int i = 0; i < dialogMessages.Length; i++) { bool active = i == ShowMessageNo; dialogMessages[i].SetActive(active); } OpenDialog(type); }
public void StartAnim(DialogAnimation.AnimType animType, bool isOpen) { if (!Application.get_isPlaying()) { return; } this.isOpen = isOpen; TweenAlpha component = base.GetComponent <TweenAlpha>(); if (component != null) { component.onFinished.Clear(); } iTween.Stop(base.get_gameObject()); switch (animType) { case DialogAnimation.AnimType.POPUP: if (this.IsOpen) { this.PopUpIn(); } else { this.PopUpOut(); } break; case DialogAnimation.AnimType.FEAD: if (this.IsOpen) { this.FadeIn(); } else { this.FadeOut(); } break; case DialogAnimation.AnimType.SLIDE: if (this.IsOpen) { this.SlideIn(0, 0.5f); } else { this.SlideOut(0, 0.5f); } break; } if (this.Black != null) { float alpha = (!isOpen) ? 0f : 0.5f; TweenAlpha.Begin(this.Black, this.fadeTime, alpha); } this.isFinished = false; }
private void OpenDialog(DialogAnimation.AnimType type) { setActiveChildren(isActive: true); if (ienum != null) { StopCoroutine(ienum); } keyController = new KeyControl(); keyController.IsRun = false; myPanel.alpha = 1f; if (isUseDefaultKeyController) { keyController.IsRun = true; App.OnlyController = keyController; App.OnlyController.ClearKeyAll(); keyController.firstUpdate = true; } dialogAnimation.StartAnim(type, isOpen: true); if (CameraBlur != null) { CameraBlur.enabled = true; } isOpen = true; }
private void OpenDialog(DialogAnimation.AnimType type) { this.setActiveChildren(true); if (this.ienum != null) { base.StopCoroutine(this.ienum); } this.keyController = new KeyControl(0, 0, 0.4f, 0.1f); this.keyController.IsRun = false; this.myPanel.alpha = 1f; if (this.isUseDefaultKeyController) { this.keyController.IsRun = true; App.OnlyController = this.keyController; App.OnlyController.ClearKeyAll(); this.keyController.firstUpdate = true; } this.dialogAnimation.StartAnim(type, true); if (this.CameraBlur != null) { this.CameraBlur.set_enabled(true); } this.isOpen = true; }