/// <summary> /// GuiWrapper切换,有移动动画 /// </summary> /// <param name="targetID"></param> /// <param name="mID"></param> /// <param name="isIn"></param> public void SwitchWrapperWithMove(GuiFrameID targetID, MoveID mID, bool isIn) { root.GetComponent <GraphicRaycaster>().enabled = false; Object reource = GetGuiResource(targetID); if (reource == null) { MyDebug.LogYellow("Can not load reousce: " + targetID.ToString()); return; } GameObject targetWrapper = Object.Instantiate(reource, root.transform) as GameObject; if (isIn) { targetWrapper.transform.DOLocalMoveX(Screen.width * (int)mID, TweenDuration, true). From(). SetEase(Ease.OutQuint). OnComplete(() => TweenComplete(targetWrapper)); } else { targetWrapper.transform.SetAsFirstSibling(); GuiFrameWrapper topGui = null; if (guiFrameStack.Count > 0) { topGui = guiFrameStack.Peek(); } if (topGui) { topGui.transform.DOLocalMoveX(Screen.width * (int)mID, TweenDuration, true). SetEase(Ease.OutQuint). OnComplete(() => TweenComplete(targetWrapper)); } } }
/// <summary> /// Gui垂直动画 /// </summary> /// <param name="gui"></param> /// <param name="endValue"></param> /// <param name="mID"></param> /// <param name="isIn"></param> public static void GuiVerticalMove(GameObject gui, float endValue, MoveID mID, CanvasGroup canvasGroup, bool isIn, System.Action completed = null) { if (isIn) { gui.transform.DOLocalMoveY(endValue * (int)mID, tweenDuration, true). From(). SetEase(Ease.OutQuint). OnStart(() => canvasGroup.blocksRaycasts = false). OnComplete(() => { if (completed != null) { completed(); } canvasGroup.blocksRaycasts = true; }); } else { gui.transform.DOLocalMoveY(endValue * (int)mID, tweenDuration, true). SetEase(Ease.OutQuint). OnStart(() => canvasGroup.blocksRaycasts = false). OnComplete(() => { if (completed != null) { completed(); } canvasGroup.blocksRaycasts = true; gui.SetActive(false); gui.GetComponent <RectTransform>().anchoredPosition = Vector3.zero; }); } }
public override int GetHashCode() { int hash = 1; if (MoveID != 0) { hash ^= MoveID.GetHashCode(); } if (U2 != 0) { hash ^= U2.GetHashCode(); } if (U3 != 0) { hash ^= U3.GetHashCode(); } if (U4 != 0) { hash ^= U4.GetHashCode(); } if (U5 != 0) { hash ^= U5.GetHashCode(); } if (Type != 0) { hash ^= Type.GetHashCode(); } if (U7 != 0) { hash ^= U7.GetHashCode(); } if (U8 != 0) { hash ^= U8.GetHashCode(); } if (Drain != 0) { hash ^= Drain.GetHashCode(); } if (Power != 0) { hash ^= Power.GetHashCode(); } if (Accuracy != 0) { hash ^= Accuracy.GetHashCode(); } if (U12 != 0) { hash ^= U12.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }