Example #1
0
        public Saved_StateNode GetSavedState(StateNode node)
        {
            Saved_StateNode saveStateNode = null;

            stateNodesDict.TryGetValue(node, out saveStateNode);
            return(saveStateNode);
        }
Example #2
0
        public void RemoveStateNode(StateNode node)
        {
            Saved_StateNode savedStateNode = GetSavedState(node);

            if (savedStateNode != null)
            {
                savedStateNodes.Remove(savedStateNode);
                stateNodesDict.Remove(node);
            }
        }
Example #3
0
        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;
        }
Example #4
0
 public void Init(StateNode enterState, Transition transition)
 {
     this.enterState       = enterState;
     this.targetTransition = transition;
 }
Example #5
0
 public void ConnectStateNode(StateNode stateNode)
 {
     targetTransition.targetState = stateNode.currentState;
     targetNode = stateNode;
 }