コード例 #1
0
        internal static void DoAction(PulseActionEnum action, Game game, SystemEntityJumpPair jumpPair)
        {
            _jumpPair = jumpPair;
            _game     = game;

            EnumProcessorMap[action].DynamicInvoke(game, jumpPair);
        }
コード例 #2
0
        public static void SetJump(Game game, DateTime exitTime, StarSystem entrySystem, DateTime entryTime, Entity jumpingEntity)
        {
            SystemEntityJumpPair jumpPair = new SystemEntityJumpPair
            {
                JumpSystem    = entrySystem,
                JumpingEntity = jumpingEntity
            };

            game.GameLoop.AddSystemInteractionInterupt(exitTime, PulseActionEnum.JumpOutProcessor, jumpPair);

            game.GameLoop.AddSystemInteractionInterupt(entryTime, PulseActionEnum.JumpInProcessor, jumpPair);
        }
コード例 #3
0
 internal static void JumpIn(Game game, SystemEntityJumpPair jumpPair)
 {
     jumpPair.JumpingEntity.Transfer(jumpPair.JumpSystem.SystemManager);
 }
コード例 #4
0
 //TODO look at turning the entity into a ProtoEntity instead of shifting it to the GlobalManager
 internal static void JumpOut(Game game, SystemEntityJumpPair jumpPair)
 {
     jumpPair.JumpingEntity.Transfer(game.GlobalManager);
 }
コード例 #5
0
 /// <summary>
 /// Adds an interupt where systems are interacting (ie an entity jumping between systems)
 /// this forces all systems to synch at this datetime.
 /// </summary>
 /// <param name="datetime"></param>
 /// <param name="action"></param>
 /// <param name="jumpPair"></param>
 internal void AddSystemInteractionInterupt(DateTime datetime, PulseActionEnum action, SystemEntityJumpPair jumpPair)
 {
     if (!EntityDictionary.ContainsKey(datetime))
     {
         EntityDictionary.Add(datetime, new Dictionary <PulseActionEnum, List <SystemEntityJumpPair> >());
     }
     if (!EntityDictionary[datetime].ContainsKey(action))
     {
         EntityDictionary[datetime].Add(action, new List <SystemEntityJumpPair>());
     }
     EntityDictionary[datetime][action].Add(jumpPair);
 }