Esempio n. 1
0
        public static ISystem CreateSystem(this Pool pool, Type systemType)
        {
            var system = (ISystem)Activator.CreateInstance(systemType);

            return(pool.CreateSystem(system));
        }
Esempio n. 2
0
 public static Systems GetSystems(Pool pool)
 {
     #if (UNITY_EDITOR)
     return new DebugSystems()
     #else
         return new Systems()
     #endif
         // Initialize
         .Add(pool.CreateSystem<RemoveViewSystem>())
         .Add(pool.CreateSystem<AddViewSystem>())
         .Add(pool.CreateSystem<CreatePilotsSystem>())
         .Add(pool.CreateSystem<StartGameSystem>())
         .Add(pool.CreateSystem<CreateEventsSystem>())
         .Add(pool.CreateSystem<CreateAircraftSystem>())
         .Add(pool.CreateSystem<PauseSystem>())
         .Add(pool.CreateSystem<TimeSystem>())
         .Add(pool.CreateSystem<UINavigationSystem>())
         .Add(pool.CreateSystem<EventPredicateCheckingSystem>())
         .Add(pool.CreateSystem<EventResolutionSystem>());
 }
Esempio n. 3
0
 public static ISystem CreateSystem <T>(this Pool pool) where T : ISystem, new()
 {
     return(pool.CreateSystem(typeof(T)));
 }
        private Systems CreateSystems(Pool pool)
        {
#if (UNITY_EDITOR)
            return new DebugSystems()
#else
        return new Systems()
#endif
                .Add(pool.CreateSystem<TickingSystem>())
                .Add(pool.CreateSystem<PositionUpdatingSystem>())
                .Add(pool.CreateSystem<RenderForceSystem>())
                .Add(pool.CreateSystem<BulletCollisionSystem>())
                .Add(pool.CreateSystem<AddViewSystem>())
                .Add(pool.CreateSystem<LevelStartingSystem>())
                .Add(pool.CreateSystem<SpaceshipControlsSystem>())
                .Add(pool.CreateSystem<AddRigidbodySystem>())
                .Add(pool.CreateSystem<AgingSystem>())
                .Add(pool.CreateSystem<MaxAgeSystem>())
                .Add(pool.CreateSystem<AsteroidSplittingSystem>())
                .Add(pool.CreateSystem<RenderRotationSystem>())
                .Add(pool.CreateSystem<GunFiringSystem>())
                .Add(pool.CreateSystem<GunCooldownSystem>())
                .Add(pool.CreateSystem<LevelEndingSystem>())
                .Add(pool.CreateSystem<SpaceshipRespawningSystem>())
                .Add(pool.CreateSystem<SpaceshipCollisionSystem>())
                .Add(pool.CreateSystem<InputDestructionSystem>())
                .Add(pool.CreateSystem<BoundsWrappingSystem>())
                .Add(pool.CreateSystem<RenderPositionSystem>())
                .Add(pool.CreateSystem<RemoveViewSystem>())
                .Add(pool.CreateSystem<DestroyingSystem>());
        }