Exemple #1
0
        public static MockWorld Create(Options options)
        {
            var mockWorld = new MockWorld();

            var connectionBuilder = new MockConnectionHandlerBuilder();

            mockWorld.Connection = connectionBuilder.ConnectionHandler;

            mockWorld.Worker = WorkerInWorld
                               .CreateWorkerInWorldAsync(connectionBuilder,
                                                         options.WorkerType ?? "TestWorkerType",
                                                         options.Logger ?? new LoggingDispatcher(),
                                                         Vector3.zero)
                               .Result;

            options.AdditionalSystems?.Invoke(mockWorld.Worker.World);

            mockWorld.Linker = new EntityGameObjectLinker(mockWorld.Worker.World);

            PlayerLoopUtils.ResolveSystemGroups(mockWorld.Worker.World);

            return(mockWorld);
        }
Exemple #2
0
 public void Setup()
 {
     World = MockWorld.Create(GetOptions());
 }