static void Main(string[] args) { WindowCreateInfo wci = new WindowCreateInfo { X = 100, Y = 100, WindowWidth = 1280, WindowHeight = 720, WindowTitle = "Tortuga Demo" }; GraphicsDeviceOptions options = new GraphicsDeviceOptions( debug: false, swapchainDepthFormat: PixelFormat.R16_UNorm, syncToVerticalBlank: true, resourceBindingModel: ResourceBindingModel.Improved, preferDepthRangeZeroToOne: true, preferStandardClipSpaceYDirection: true); #if DEBUG options.Debug = true; #endif _editorMenu = new EditorMenu(); Message <TransformMessageApplier>(); Message <InputForceApplier>(); Message <SimpleCameraMover>(); Message <ClientEntityAssignmentApplier>(); Message <VoxelSpaceMessageApplier>(); Message <VoxelGridMessageApplier>(); Message <VoxelGridChangeMessageApplier>(); Message <EntityRemover>(); Message <VoxelEditReceiver>(); Message <VoxelSpaceLoadReciever>(); Message <ComponentSyncMessageApplier <EntityMetaData> >(); _messageTargetMap = new MessageTargetMap(_byType, _byNum); _clientMessagingChannel = new MessagingChannel(_messageTargetMap); _client = new ClunkerClientApp(new ResourceLoader(), _messageTargetMap, _clientMessagingChannel); _client.Started += _client_Started; _server = new ClunkerServerApp(); _server.Started += _server_Started; var serverTask = _server.Start(); _client.Start(wci, options).Wait(); }
public ClunkerClientApp(ResourceLoader resourceLoader, MessageTargetMap messageTargetMap, MessagingChannel messagingChannel) { Resources = resourceLoader; }