protected override void LoadContent() { this.camera = new PerspectiveCamera(this.GraphicsDevice.Viewport); this.injector = new Injector(this); this.injector.Resolve <Content>().LoadContent(this.Content); this.spriteBatch = this.injector.Resolve <SpriteBatch>(); this.renderPipeline = this.injector.Resolve <DeferredRenderPipeline>(); this.sceneSelector = this.injector.Resolve <SceneSelector>(); this.server = this.injector.Resolve <Server>(); this.client = this.injector.Resolve <Client>(); this.keyboard = this.injector.Resolve <UI.Input.KeyboardInput>(); this.metricServer = this.injector.Resolve <IMetricServer>(); this.metricServer.Start(7070); this.uiManager = this.injector.Resolve <UIManager>(); this.uiManager.LoadState(); if (this.uiManager.State.NetState.AutoStartServer) { this.server.Start(Server.DefaultServerPort); } if (this.uiManager.State.NetState.AutoStartClient) { this.client.Connect(new IPEndPoint(IPAddress.Loopback, Server.DefaultServerPort)); } }
public CameraController(KeyboardInput keyboard, MouseInput mouse) { this.Keyboard = keyboard; this.Mouse = mouse; this.forward = Vector3.Forward; this.left = Vector3.Left; this.up = Vector3.Up; this.TranslateSpeed = 10.0f; }
public UIManager(Game game, SpriteBatch spriteBatch, ImGuiRenderer gui, RenderTargetDescriber renderTargetDescriber, SceneSelector sceneSelector, EntityController entityController, CameraController cameraController, Editors editors, IList <IMenu> menus, EntityWindow entityWindow, NetWindow netWindow, KeyboardInput keyboardInput, MouseInput mouseInput) { this.Gui = gui; this.KeyboardInput = keyboardInput; this.MouseInput = mouseInput; this.GameLoop = game; this.SpriteBatch = spriteBatch; this.CameraController = cameraController; this.RenderTargetDescriber = renderTargetDescriber; this.SceneSelector = sceneSelector; this.EntityController = entityController; this.Menus = menus; this.EntityWindow = entityWindow; this.NetWindow = netWindow; this.Editors = editors; }