public Transition AddTransitionToState_OLD(MotionMatchingState toState, int nodeID, Rect rect, bool portal = false) { Transition t = null;// new Transition(TransitionType., toState.GetIndex()); switch (toState.GetStateType()) { case MotionMatchingStateType.MotionMatching: t = new Transition(MotionMatchingStateType.MotionMatching, toState.GetIndex()); break; case MotionMatchingStateType.SingleAnimation: t = new Transition(MotionMatchingStateType.SingleAnimation, toState.GetIndex()); break; } t.toPortal = portal; if (!portal) { t.portalRect = Rect.zero; } else { t.portalRect = rect; } t.nodeID = nodeID; transitions.Add(t); return(t); }
public void AddFindigBestPoseOption(MotionMatchingState toState) { if (toState.GetStateType() != MotionMatchingStateType.MotionMatching) { for (int i = 0; i < toState.motionDataGroups[0].animationData.Count; i++) { whereCanFindingBestPose.Add(new Vector2(0f, toState.motionDataGroups[0].animationData[i].animationLength)); } } }
public void AddCheckingTransitionOption(MotionMatchingState fromState) { if (fromState.GetStateType() != MotionMatchingStateType.MotionMatching) { for (int i = 0; i < fromState.motionDataGroups[0].animationData.Count; i++) { this.whenCanCheckingTransition.Add(new Vector2(0f, fromState.motionDataGroups[0].animationData[i].animationLength)); } } }
public bool AddTransition(MotionMatchingState toState, int nodeID, bool portal = false) { transitions.Add(new Transition( toState.GetStateType(), toState.GetIndex() )); transitions[transitions.Count - 1].nodeID = nodeID; transitions[transitions.Count - 1].transitionRect = new Rect(); transitions[transitions.Count - 1].transitionRect.size = new Vector2(15, 15); transitions[transitions.Count - 1].toPortal = portal; transitions[transitions.Count - 1].fromStateIndex = this.GetIndex(); return(false); }