getBlockRenderPositionInts method

Vector2 getBlockRenderPositionInts(
  1. int i,
  2. int j
)

Same as getBlockRenderPosition but the arguments are exploded as integers.

Implementation

Vector2 getBlockRenderPositionInts(int i, int j) {
  final halfTile = _blockRenderPositionCache
    ..setValues(
      effectiveTileSize.x / 2,
      (effectiveTileSize.y / 2) / scalingFactor,
    )
    ..multiply(scale);
  final cartesianPosition = _cartesianPositionCache
    ..setValues(i.toDouble(), j.toDouble())
    ..multiply(halfTile);
  return cartToIso(cartesianPosition)
    ..add(_offset)
    ..sub(halfTile);
}