private void moveSelectorIntoVisibleArea() { FloatBounds2 bounds = cameraWithEsMovementSystem.visibleArea; if (!bounds.isIn(selector.position)) { bounds.putInto(selector.position); } }
// sets camera target by value (scene) private void setCameraTarget(float x, float y, float z) { cameraTarget.Set(x, y, z); cameraTarget = cameraBounds.putInto(cameraTarget); updateVisibleArea(); // camera target changed }
private void ensureCameraBounds() => target = cameraBounds.putInto(target);