Esempio n. 1
0
        private void ExecuteTransition(StateVertex targetStateVertex)
        {
            currentStateVertex?.OnExit();

            currentStateVertex = targetStateVertex;
            currentStateVertex?.OnEnter();
        }
 public StateTransition Target(StateVertex target)
 {
     if (TargetStateVertex != null)
     {
         throw new Exception("Duplicated transition target");
     }
     TargetStateVertex = target;
     TargetStateVertex.AddIncomingTransition(this);
     return(this);
 }
Esempio n. 3
0
 public void AddVertex(StateVertex vertex)
 {
     Vertices.Add(vertex);
 }
Esempio n. 4
0
 public void PrepareTransition(StateVertex targetStateVertex)
 {
     ExecuteTransition(targetStateVertex);
 }
 public StateTransition(StateVertex source)
 {
     SourceStateVertex = source;
 }
 private void AddVertex(StateVertex vertex)
 {
     stateChart.AddVertex(vertex);
 }