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))); }
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); }
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)); }
public TimeSystems(Contexts contexts, UnityServices service) { Add(new TimeSystem(contexts, service.TimeService)); }
public InputSystems(Contexts contexts, UnityServices services) { Add(new InputSystem(contexts, services.InputService)); }
public MetaSystems(Contexts contexts, UnityServices service) { Add(new ConfigsInitializationSystem(contexts)); }