mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-02 11:28:20 +08:00
formatting files
This commit is contained in:
committed by
Erick (CptBlackPixel)
parent
ccc4677663
commit
110aa376d8
@ -69,9 +69,10 @@ class TiledComponent extends Component {
|
||||
final image = images[tile.image.source];
|
||||
|
||||
final rect = tile.computeDrawRect();
|
||||
final src =
|
||||
Rect.fromLTWH(rect.left.toDouble(), rect.top.toDouble(), rect.width.toDouble(), rect.height.toDouble());
|
||||
final dst = Rect.fromLTWH(tile.x.toDouble(), tile.y.toDouble(), rect.width.toDouble(), rect.height.toDouble());
|
||||
final src = Rect.fromLTWH(rect.left.toDouble(), rect.top.toDouble(),
|
||||
rect.width.toDouble(), rect.height.toDouble());
|
||||
final dst = Rect.fromLTWH(tile.x.toDouble(), tile.y.toDouble(),
|
||||
rect.width.toDouble(), rect.height.toDouble());
|
||||
|
||||
c.drawImageRect(image, src, dst, paint);
|
||||
});
|
||||
@ -82,7 +83,8 @@ class TiledComponent extends Component {
|
||||
|
||||
Future<ObjectGroup> getObjectGroupFromLayer(String name) {
|
||||
return future.then((onValue) {
|
||||
return map.objectGroups.firstWhere((objectGroup) => objectGroup.name == name);
|
||||
return map.objectGroups
|
||||
.firstWhere((objectGroup) => objectGroup.name == name);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user