Skip to content

Commit

Permalink
Reviewer comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jtmcdole committed Sep 23, 2022
1 parent 6e9d5b7 commit d094f33
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/flame_tiled/lib/src/mutable_rect.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'dart:ui' show Rect;
class MutableRect extends Rect {
/// Construct a rectangle from its left, top, right, and bottom edges.
MutableRect.fromLTRB(this.left, this.top, this.right, this.bottom)
: super.fromLTRB(left, top, right, bottom); // must call?
: super.fromLTRB(left, top, right, bottom);

/// Create a new instance from [other].
factory MutableRect.fromRect(Rect other) =>
Expand Down
7 changes: 2 additions & 5 deletions packages/flame_tiled/lib/src/tiled_component.dart
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,9 @@ class TiledComponent<T extends FlameGame> extends PositionComponent
);

case MapOrientation.isometric:
final dimensions = mapWidth + mapHeight;
final halfTile = tileScaled / 2;
return Vector2(
halfTile.x * dimensions,
halfTile.y * dimensions,
);
final dimensions = mapWidth + mapHeight;
return halfTile..scale(dimensions.toDouble());

case MapOrientation.orthogonal:
return Vector2(
Expand Down

0 comments on commit d094f33

Please sign in to comment.