public Saved_StateNode GetSavedState(StateNode node) { Saved_StateNode saveStateNode = null; stateNodesDict.TryGetValue(node, out saveStateNode); return(saveStateNode); }
public void RemoveStateNode(StateNode node) { Saved_StateNode savedStateNode = GetSavedState(node); if (savedStateNode != null) { savedStateNodes.Remove(savedStateNode); stateNodesDict.Remove(node); } }
public void SetStateNode(StateNode node) { Saved_StateNode savedStateNode = GetSavedState(node); if (savedStateNode == null) { savedStateNode = new Saved_StateNode(); savedStateNodes.Add(savedStateNode); stateNodesDict.Add(node, savedStateNode); } savedStateNode.state = node.currentState; savedStateNode.position = new Vector2(node.windowRect.x, node.windowRect.y); savedStateNode.isCollaps = node.collapse; }
public void Init(StateNode enterState, Transition transition) { this.enterState = enterState; this.targetTransition = transition; }
public void ConnectStateNode(StateNode stateNode) { targetTransition.targetState = stateNode.currentState; targetNode = stateNode; }