public InterfaceController(InterfaceModel model, Game gameOwner, IsometricEngine engine) { _interfaceModel = model; _game = gameOwner; _engine = engine; oldPressedKeys = Keyboard.GetState().GetPressedKeys(); }
public void SetNewMousePosition(Point newPosition, IsometricEngine gameEngine) { MousePointOld = MousePoint; MousePoint = newPosition; MousePointDelta = new Point(MousePointOld.X - MousePoint.X, MousePointOld.Y - MousePoint.Y); Point cameraOffset = new Point((CameraPos.X * -1 * ZoomLevel), ((CameraPos.Y * -1 * ZoomLevel))); MousePointIsometricGrid = Iso2D.ConvertScreenToTile(MousePoint, (gameEngine.TileSize.X * ZoomLevel), (gameEngine.TileSize.Y * ZoomLevel), gameEngine.FirstTileXyPosition(ZoomLevel), cameraOffset); }
public InterfaceView(InterfaceModel model, IsometricEngine gameEngine) { _interfaceModel = model; _engine = gameEngine; }