public void Setup()
        {
            world         = new World("TestWorld");
            entityManager = world.GetOrCreateManager <EntityManager>();
            worker        = world.CreateManager <WorkerSystem>(null, new LoggingDispatcher(), "TestWorker", Vector3.zero);
            world.CreateManager <EntityGameObjectLinkerSystem>();

            gameObjectDispatcherSystem = world.GetOrCreateManager <GameObjectDispatcherSystem>();

            workerGameObject = new GameObject();
            workerGameObject.AddComponent <MonoBehaviourOnWorker>();
            GameObjectCreationSystemHelper.EnableStandardGameObjectCreation(world, workerGameObject: workerGameObject);
            workerLinkerSystem = world.GetExistingManager <WorkerEntityGameObjectLinkerSystem>();
        }
Exemple #2
0
 public static void AddGameLogicSystems(World world)
 {
     AddLifecycleSystems(world);
     TransformSynchronizationSystemHelper.AddServerSystems(world);
     PlayerLifecycleConfig.AddServerSystems(world);
     GameObjectRepresentationSystemHelper.AddSystems(world);
     GameObjectCreationSystemHelper.EnableStandardGameObjectCreation(world);
     world.GetOrCreateManager <CubeMovementSystem>();
     world.GetOrCreateManager <TriggerColorChangeSystem>();
     world.GetOrCreateManager <ProcessLaunchCommandSystem>();
     world.GetOrCreateManager <ProcessRechargeSystem>();
     world.GetOrCreateManager <MetricSendSystem>();
     world.GetOrCreateManager <ProcessScoresSystem>();
     world.GetOrCreateManager <CollisionProcessSystem>();
 }
Exemple #3
0
 public static void AddClientSystems(World world)
 {
     AddLifecycleSystems(world);
     TransformSynchronizationSystemHelper.AddClientSystems(world);
     PlayerLifecycleConfig.AddClientSystems(world);
     GameObjectRepresentationSystemHelper.AddSystems(world);
     GameObjectCreationSystemHelper.EnableStandardGameObjectCreation(world);
     world.GetOrCreateManager <ProcessColorChangeSystem>();
     world.GetOrCreateManager <LocalPlayerInputSync>();
     world.GetOrCreateManager <MoveLocalPlayerSystem>();
     world.GetOrCreateManager <InitCameraSystem>();
     world.GetOrCreateManager <FollowCameraSystem>();
     world.GetOrCreateManager <InitUISystem>();
     world.GetOrCreateManager <UpdateUISystem>();
     world.GetOrCreateManager <PlayerCommandsSystem>();
     world.GetOrCreateManager <MetricSendSystem>();
 }