Ejemplo n.º 1
0
 public void SetAdvanceTimeAction(int seconds, bool allowVariance, float varianceValue)
 {
     advanceTime               = new AdvanceTimeAction();
     advanceTime.Seconds       = seconds;
     advanceTime.VarianceSet   = allowVariance;
     advanceTime.VarianceValue = varianceValue;
     advanceTimeSet            = true;
 }
Ejemplo n.º 2
0
        public Timeline(TStateType initialState, ITimelineStorage <TStateType> historyStorage,
                        AdvanceTimeAction advanceTimeAction,
                        ProcessCommandAction processCommandAction)
        {
            CurrentFrame = 0u;
            LatestFrame  = 0u;

            OldestNewCommandFrame = 0;
            NeedRewind            = false;

            _history = historyStorage;
            _history[CurrentFrame] = initialState;

            _advanceTimeAction    = advanceTimeAction;
            _processCommandAction = processCommandAction;

            _commands    = new Dictionary <uint, List <TCommandType> >();
            InitialState = initialState;
        }
Ejemplo n.º 3
0
 public Timeline(TStateType initialState, uint historySize, AdvanceTimeAction advanceTime,
                 ProcessCommandAction processCommand) : this(initialState, new TimelineStorage <TStateType>(historySize),
                                                             advanceTime, processCommand)
 {
 }