public StateMachine() { this.StateMapI = new Dictionary <TState, State <TState, TTransition, TSignal> >(); this.SignalMapI = new Dictionary <TSignal, Signal <TState, TTransition, TSignal> >(); this.TransitionMapI = new Dictionary <TTransition, Transition <TState, TTransition, TSignal> >(); this.actions = new StateMachineActionList(); this.tickableActions = new TickableList(); this.transitionTickType = TickType.Tick; }
internal State(TState name) : base(name) { this.TransitionsI = new Dictionary <Transition <TState, TTransition, TSignal>, State <TState, TTransition, TSignal> >(); this.OrthogonalsI = new Dictionary <int, Orthogonal <TState, TTransition, TSignal> > { { DefaultOrthogonalIndex, new Orthogonal <TState, TTransition, TSignal>(this, DefaultOrthogonalIndex) } }; this.actions = new StateActionList(); this.tickableActions = new TickableList(); this.idleStateStatus = new IdleStateStatus(this); this.currentStateStatus = new CurrentStateStatus(this); this.status = this.idleStateStatus; }
internal Transition(StateMachine <TState, TTransition, TSignal> machine, TTransition name, TickType tickType) : base(name) { this.MachineI = machine; this.CanTransitionI = true; this.SignalsI = new List <Signal <TState, TTransition, TSignal> >(); this.actions = new TransitionActionList(); this.tickableActions = new TickableList(); this.startConditions = new TransitionConditionList(); this.finishConditions = new TransitionConditionList(); this.idleStatus = new IdleStatus(this, tickType); this.startingStatus = new StartingStatus(this, tickType); this.finishingStatus = new FinishingStatus(this, tickType); this.status = this.idleStatus; this.signal = null; }