/// <summary> /// 显示敌我目标tips /// </summary> /// <param name="Info">目标数据</param> /// <param name="tipRect">弹出tips的控件对象</param> /// <param name="align">对其方式</param> /// <param name="isTouchDestroy">是否触碰销毁</param> /// <returns></returns> public static void ShowTargetTips(TargetHeroInfo Info, RectTransform tipRect, TipAlignment align, Vector2 offset, bool isTouchDestroy) { WndManager.DestoryWnd <TargetInfoWnd>(); WndManager.CreateWnd <TargetInfoWnd>(WndType.DialogWnd, false, false, (wnd) => { (wnd as TargetInfoWnd).SetData(new object[] { 0, Info, tipRect, align, offset, isTouchDestroy }); }); }
private IEnumerator DestorySelfWnd(float delayTime) { yield return(new WaitForSeconds(delayTime)); //LoginM.Init(null); //LoginM.ConnectLoginServer(); SceneM.Load(BattleScene.GetSceneName()); WndManager.DestoryWnd <StarupWnd>(); }
void Update() { if (m_IsTouchDestrory == true) { if (Input.GetMouseButtonUp(0)) { WndManager.DestoryWnd <TargetInfoWnd>(); } } }
void BtnDelClick() { if (m_curCirObj != null) { LabEnv.ClearAllHighlightLabObj(); m_curCirObj.DestroyLabObject(); } WndManager.DestoryWnd <ClickMenuWnd>(); NDCircuitObject.CreateCirCuit(); }
private void DoCallback(TipButton btn) { ClickButton = btn; if (m_callback != null) { m_callback(this); m_callback = null; } m_ani.SetTrigger("Close"); WndManager.DestoryWnd <ConfirmWnd>(0.3f); }
public void BtnSkipClick() { if (m_IsHaveOption == true) { return; } if (m_curCofig != null) { TipsHelper.ShowSkipMsgBox(m_curCofig.SkipSummary, DoSkipCall); } else { WndManager.DestoryWnd <AdventureDialogueWnd>(0.5f + waitCloseDialogTime); } }
private void RingDrag() { if (m_btnRing != null && m_kickBall != null) { m_btnRing.gameObject.SetActive(false); m_kickBall.gameObject.SetActive(true); } //if (m_objRing != null) //{ // m_objRing.SetActive(true); //} EventCenter.DispatchEvent(EventCenterType.Battle_SkyView, -1, null); WndManager.DestoryWnd <SwingModeWnd>(); }
private void DoSkipCall(IMsgBoxResult reslut) { // 回调的时候已经销毁了 if (this == null) { return; } if (reslut.ClickButton == TipButton.Ok) { if (m_curCofig != null) { SceneDialogueConfig cfg = FindNextOption(m_curCofig); if (cfg == m_curCofig) { return; } else { if (cfg == null) { m_DialogAni.SetTrigger("Dialogue_out"); m_OptionAni.SetTrigger("Option_Main_out"); StartCoroutine(PlayOut(m_curCofig, true)); //WndManager.DestoryWnd<AdventureDialogueWnd>(0.5f + waitCloseDialogTime); } else { StartCoroutine(Play(m_curCofig, cfg, 0, true, false)); m_curCofig = cfg; } } } else { WndManager.DestoryWnd <AdventureDialogueWnd>(0.5f + waitCloseDialogTime); } } }
public void BtnNextClick() { if (m_IsHaveOption == true) { return; } // if (m_curCofig == null) { SoundManager.StopMusic(SoundType.dialog); WndManager.DestoryWnd <AdventureDialogueWnd>(0.5f + waitCloseDialogTime); } else { if (m_playStep == PlaySetp.end) { SceneDialogueConfig cfg = SceneDialogueDao.Inst.GetCfg(m_curCofig.NextDialogueId); if (cfg != null) { StartCoroutine(Play(m_curCofig, cfg, 0, false, true)); m_curCofig = cfg; } else { StartCoroutine(PlayOut(m_curCofig, true)); } } else if (m_playStep == PlaySetp.playOption) { m_isClickNext = true; } else if (m_playStep == PlaySetp.playDialogPrint) { m_isClickNext = true; } } }
/// <summary> /// 关闭消息框 /// </summary> public static void CloseMsgBox() { WndManager.DestoryWnd <ConfirmWnd>(); }
/// <summary> /// 关闭敌我目标tips /// </summary> /// <returns></returns> public static void CloseTargetTips() { WndManager.DestoryWnd <TargetInfoWnd>(); }
public void OnPointerClick(PointerEventData eventData) { WndManager.DestoryWnd <ClickMenuWnd>(); }
void BtnCancelClick() { WndManager.DestoryWnd <ClickMenuWnd>(); }
private IEnumerator PlayOut(SceneDialogueConfig cfg, bool isDestroyWnd) { m_playStep = PlaySetp.playout; if (cfg == null) { m_IsHaveOption = false; if (m_List != null && m_List.Count > 0) { foreach (GameObject g in m_List) { GameObject.Destroy(g); } } m_List.Clear(); yield return(null); } else { // 退出动画 if (cfg.Image != "") { if (cfg.Direction == 0) { if (cfg.ImageExit == 1) // 滑出 { m_HeroAni1.SetTrigger("Out_1"); } else if (cfg.ImageExit == 2) // 淡出 { m_HeroAni1.SetTrigger("Out_2"); } } else { if (cfg.ImageExit == 1) { m_HeroAni2.SetTrigger("Out_1"); } else if (cfg.ImageExit == 2) // 淡出 { m_HeroAni2.SetTrigger("Out_2"); } } } // 退出 if (cfg.DialogueExit == 1) { m_DialogAni.SetTrigger("Dialogue_out"); } if (m_IsHaveOption == true) { m_OptionAni.SetTrigger("Option_Main_out"); } yield return(Yielders.GetWaitForSeconds(0.33f)); m_IsHaveOption = false; if (m_List != null && m_List.Count > 0) { foreach (GameObject g in m_List) { GameObject.Destroy(g); } } m_List.Clear(); if (isDestroyWnd == true) { WndManager.DestoryWnd <AdventureDialogueWnd>(0.5f + waitCloseDialogTime); } } }
public void TryDestroy() { //WndManager.DestoryWnd<LoadingWnd>(0.5f + 1.0f); WndManager.DestoryWnd <LoadingWnd>(0.5f); }
private void Swing() { self = BattleM.SelfSel; var varWnd = WndManager.FindWnd <MineBallSpinWnd>(); if (m_swingInfo != null) { float offset = (m_move.transform.localEulerAngles.z - 180 + 40) / 80 * 100; if (offset < 0) { offset = 0; } else if (offset > 99) { offset = 100; } ClubparameterConfig clubConfig = ClubparameterDao.Inst.GetCfg((uint)self.Club.Type); if (BattleM.BallInAra == AreaType.PuttingGreen) { m_swingInfo.CurAccuracyOffset = 0; if (clubConfig != null) { m_swingInfo.BattingSpeed = MathUtil.RotateRound(BattleM.GetRollSpeedDir() * clubConfig.MinDistance, m_dragPower, m_ballAngle); } m_swingInfo.CurHookAngle = m_greenAngle; } else { m_swingInfo.CurHookAngle = m_ballAngle; m_swingInfo.CurAccuracyOffset = 50 - offset; m_swingInfo.BattingSpeed = self.NeedSpeed * m_dragPower; } m_swingInfo.Ball = self.Ball; m_swingInfo.Club = self.Club; //m_swingInfo.WindSpeed ; if (varWnd != null) { m_swingInfo.CurFBSpin = varWnd.m_CurFBSpin; //self.Club.BackSpin = varWnd.m_underSpin; m_swingInfo.CurLRSpin = varWnd.m_LRspin; //Debug.Log(m_swingInfo.m_dragAngle+".."+ m_swingInfo.m_downSpin+".."+ m_swingInfo.m_upSpin+"..." + m_swingInfo.m_leftSpin+"..."+ m_swingInfo.m_rightSpin); // Destroy(varWnd); } else { m_swingInfo.CurFBSpin = 0; m_swingInfo.CurLRSpin = 0; } movingValue = m_dragGolfPos; dragDis = Vector3.Distance(m_golfPos, m_dragGolfPos); if (m_GolfboxOut != null && m_GolfboxIn != null) { outScale = m_GolfboxOut.transform.localScale.x; inScale = m_GolfboxIn.transform.localScale.x; DOTween.To(() => outScale, x => outScale = x, 0.8f, 0.1f).OnComplete(() => { m_GolfboxOut.SetActive(false); }); DOTween.To(() => inScale, x => inScale = x, 0.6f, 0.1f).OnComplete(() => { m_GolfboxIn.SetActive(false); }); } DOTween.To(() => movingValue, x => movingValue = x, m_golfPos, 0.1f); isDrag = true; WndManager.DestoryWnd <SwingModeWnd>(0.2f); WndManager.DestoryWnd <BattleMainWnd>(0.2f); } BattleM.SetBattleStatus(BattleStatus.Round_FireBall, m_swingInfo); }