Beispiel #1
0
 public Context(RenderForm form, Dx11 directX, IGame game, WorldContainer worldContainer, IUiManager uiManager, IInput input, Camera camera, NotificationResolver notificationResolver, DataLock datalock)
 {
     _worldContainer = worldContainer;
     NotificationResolver = notificationResolver;
     Form = form;
     DirectX = directX;
     Game = game;
     TextureManager = new TextureManager(DirectX.Device);
     TextManager = new TextManager(this);
     Shaders = new ShaderManager(DirectX.Device);
     Camera = camera;
     UiManager = uiManager;
     Input = input;
     DataLock = datalock;
 }
Beispiel #2
0
 private void Initialize(DataLock dataLock)
 {
     CreateWindow();
     _directX = new Dx11(_form);
     _uiManager = new UiManager();
     _input = new Input.Input();
     _camera = new Camera(new Vector3(0, 200, 0), new Vector3(0, 0.7f, 0));
     _context = new Context(_form, _directX, _game, _worldContainer, _uiManager, _input, _camera, _notificationResolver, dataLock);
     _camera.Initialize(_context);
     _input.Initialize(_context);
     _uiManager.Initialize(_context);
     _uiManager.AddScreen(new WorldParametersScreen(_context));
 }