예제 #1
0
 private Entitas.Systems CreateSystems(Contexts contexts, UnityServices services)
 {
     return(new Feature()
            .Add(new MetaSystems(contexts, services))
            .Add(new InputSystems(contexts, services))
            .Add(new TimeSystems(contexts, services))
            .Add(new GameSystems(contexts, services)));
 }
예제 #2
0
        private void Awake()
        {
            var services = new UnityServices();
            var contexts = Contexts.sharedInstance;

            systems = CreateSystems(contexts, services);
            systems.Initialize();
        }
        /// <summary>
        ///     DI configuration with Unity Framework
        /// </summary>
        private static void DependencyInjectionConfiguration()
        {
            IUnityContainer unityContainer = IoCFactory.Instance.CurrentContainer.Container;

            UnityServices.AutoRegister(unityContainer);

            // Web controllers register
            DependencyResolver.SetResolver(new UnityDependencyResolver(unityContainer));

            // Web controllers API register

            GlobalConfiguration.Configuration.DependencyResolver = new Unity.WebApi.UnityDependencyResolver(unityContainer);
        }
예제 #4
0
 public GameSystems(Contexts contexts, UnityServices services)
 {
     Add(new GameEventSystems(contexts));
     Add(new SceneInitializationSystem(contexts));
     Add(new PathControlSystem(contexts));
     Add(new PathBuildingSystem(contexts, services.BoardFactory));
     Add(new PathChainSystem(contexts));
     Add(new PathRemoveSystem(contexts));
     Add(new PathRotationSystem(contexts));
     Add(new PathRemoveNewBoardSystem(contexts));
     Add(new InstantiateSystem(contexts, services.GameService));
     Add(new CommandExecutionSystem(contexts));
     Add(new BallDirectionSystem(contexts));
     Add(new PositionUpdateSystem(contexts));
     Add(new RotationUpdateSystem(contexts));
     Add(new RotationAroundSystem(contexts));
     Add(new LocalRotationUpdateSystem(contexts));
     Add(new AroundRotationSpawnSystem(contexts));
     Add(new SyncTransformSystem(contexts));
     Add(new DestroyedSystem(contexts));
 }
예제 #5
0
 public TimeSystems(Contexts contexts, UnityServices service)
 {
     Add(new TimeSystem(contexts, service.TimeService));
 }
예제 #6
0
 public InputSystems(Contexts contexts, UnityServices services)
 {
     Add(new InputSystem(contexts, services.InputService));
 }
예제 #7
0
 public MetaSystems(Contexts contexts, UnityServices service)
 {
     Add(new ConfigsInitializationSystem(contexts));
 }