private readonly IntBounds2 screenBounds = new IntBounds2(Screen.width, Screen.height); // todo move to view public CameraInputSystem(MouseInputSystem mouseInputSystem, MouseMovementSystem mouseMovementSystem, CameraMovementSystem cameraMovementSystem) { this.cameraMovementSystem = cameraMovementSystem; this.mouseMovementSystem = mouseMovementSystem; this.mouseInputSystem = mouseInputSystem; initControllers(); }
public CameraAndMouseHandler(LocalGameRunner initializer) // TODO link systems after creation with init() methods { mouseMovementSystem = new MouseMovementSystem(initializer); cameraMovementSystem = new CameraMovementSystem(initializer.mainCamera); mouseInputSystem = new MouseInputSystem(initializer); cameraInputSystem = new CameraInputSystem(mouseInputSystem, mouseMovementSystem, cameraMovementSystem); cameraMovementSystem.mouseInputSystem = mouseInputSystem; }
public void init() { mouseMovementSystem = GameView.get().cameraAndMouseHandler.mouseMovementSystem; state.updater = GameView.get().tileUpdater; }
public void init() { selectionHandler = GameView.get().cameraAndMouseHandler.selectionHandler; mouseMovementSystem = GameView.get().cameraAndMouseHandler.mouseMovementSystem; cameraMovementSystem = GameView.get().cameraAndMouseHandler.cameraMovementSystem; }