Пример #1
0
        internal void ProcessSystem(DateTime toDateTime)
        {
            //check validity of commands etc. here.


            //the system may need to run several times for a wanted tickLength
            //keep processing the system till we've reached the wanted ticklength
            while (SystemLocalDateTime < toDateTime)
            {
                //calculate max time the system can run/time to next interupt
                //this should handle predicted events, ie econ, production, shipjumps, sensors etc.
                TimeSpan timeDeltaMax = toDateTime - SystemLocalDateTime;
                DateTime nextDate     = GetNextInterupt(timeDeltaMax);
                TimeSpan deltaActual  = nextDate - SystemLocalDateTime;

                ShipMovementProcessor.Process(_entityManager, (int)deltaActual.TotalSeconds); //process movement for any entity that can move (not orbit)

                ProcessToNextInterupt(nextDate);
            }
        }
 public void ProcessManager(EntityManager manager, int deltaSeconds)
 {
     ShipMovementProcessor.Process(manager, deltaSeconds);
 }