private Saved_Transition GetSavedTransition(TransitionNode node) { Saved_Transition savedTransition = null; transitionNodeDict.TryGetValue(node, out savedTransition); return(savedTransition); }
public void RemoveTransitionNode(TransitionNode node) { Saved_Transition savedTransitionNode = GetSavedTransition(node); if (savedTransitionNode != null) { transitionNodes.Remove(savedTransitionNode); transitionNodeDict.Remove(node); } }
private void SetTransitionNode(TransitionNode node) { Saved_Transition savedNode = GetSavedTransition(node); if (savedNode == null) { savedNode = new Saved_Transition(); transitionNodes.Add(savedNode); transitionNodeDict.Add(node, savedNode); } savedNode.position = new Vector2(node.windowRect.x, node.windowRect.y); savedNode.transition = node.targetTransition; savedNode.enterState = node.enterState.currentState; }