private void Move() { TP.from = originalPoint.localPosition; TP.to = endPoint.localPosition; TP.ResetToBeginning(); TR.from = originalPoint.localRotation.eulerAngles; TR.to = endPoint.localRotation.eulerAngles; TR.ResetToBeginning(); TP.PlayForward(); TR.PlayForward(); sprite.spriteName = _originalSptName; Transform arrow = mDMono.transform.parent.Find("DragArrow"); if (arrow.gameObject.activeSelf) { arrow.localPosition = ArrowPoint; TweenWidth tWidth = arrow.GetComponent <TweenWidth>(); tWidth.duration = TP.duration; tWidth.ResetToBeginning(); tWidth.PlayForward(); tWidth.style = UITweener.Style.Once; TweenHeight tHeight = arrow.GetComponent <TweenHeight>(); tHeight.duration = TP.duration; tHeight.ResetToBeginning(); tHeight.PlayForward(); tHeight.style = UITweener.Style.Once; } }
/// <summary> /// LT拖拽引导 /// </summary> public void SetLTDargGuide(bool isOpen, string target = null, string content = null, int LabelWeight = 2) { m_DragGuide.gameObject.CustomSetActive(isOpen); controller.gameObject.CustomSetActive(isOpen); if (isOpen) { timerIndex = ILRTimerManager.instance.AddTimer(200, 1, delegate { timerIndex = 0; if (!string.IsNullOrEmpty(target)) { m_TargetPoint.position = GameObject.Find(target).transform.position; } TweenWidth TW = m_DragGuide.GetComponent <TweenWidth>(); TweenHeight TH = m_DragGuide.GetComponent <TweenHeight>(); TW.to = (int)m_TargetPoint.localPosition.x; TH.to = (int)m_TargetPoint.localPosition.y; m_DragHandler.to = new Vector3(m_TargetPoint.localPosition.x + 100, m_TargetPoint.localPosition.y + 100, 0); TW.ResetToBeginning(); TH.ResetToBeginning(); m_DragHandler.ResetToBeginning(); if (content != null) { m_DragMonlogLabel.text = content; m_DragMonlogLabel.width = LabelWeight; m_DragMonlogLabel.transform.parent.gameObject.CustomSetActive(true); } else { m_DragMonlogLabel.transform.parent.gameObject.CustomSetActive(false); } TweenAlpha TA = m_DragGuide.GetComponent <TweenAlpha>(); TA.ResetToBeginning(); TA.PlayForward(); }); controller.Open(); } else { if (timerIndex > 0) { ILRTimerManager.instance.RemoveTimer(timerIndex); timerIndex = 0; } UITexture Tex = m_DragGuide.GetComponent <UITexture>(); Tex.alpha = 0; controller.Close(); } }