flame-engine / tiled.dart

A Dart Tiled library. Parse your TMX files into useful representations. Compatible with Flame.
https://flame-engine.org/
MIT License
50 stars 30 forks source link

feat: Add convenience method for getting images in each layer #66

Closed Hwan-seok closed 1 year ago

Hwan-seok commented 1 year ago

Description

This PR adds the convenience method to the TiledMap that gets all TiledImage in the specific layer.

If the layer is Group, the method gets all images in the group recursively.

Checklist

Breaking Change

Related Issues

N/A

Hwan-seok commented 1 year ago

Seems some dependencies like flame_lint are outdated😅 Should I make a separate PR?

spydon commented 1 year ago

Seems some dependencies like flame_lint are outdated😅 Should I make a separate PR?

You can do it in the same one if it is not too many changes :)

Hwan-seok commented 1 year ago

As of these issues,

  1. https://github.com/flutter/flutter/issues/91107
  2. https://github.com/dart-lang/test/issues/1977

the tests are failing(technically, they could not be loaded).

spydon commented 1 year ago

As of these issues,

  1. https://github.com/flutter/flutter/issues/91107
  2. https://github.com/dart-lang/test/issues/1977

the tests are failing(technically, they could not be loaded).

Hmm, why is this package even dependant on flutter (and flutter test)? 🤔

Hwan-seok commented 1 year ago

The test code action uses flutter test by the https://github.com/flame-engine/flame-test-action/blob/fdf4cd9cf047b1b5e1359cf89ad0d88bca535523/scripts/test.sh#L10

Hmm, why is this package even dependant on flutter (and flutter test)? 🤔

Hmm..............🤣

Hwan-seok commented 1 year ago

After removing flutter from the dependencies, it complains dart:ui could not be imported ...!

spydon commented 1 year ago

After removing flutter from the dependencies, it complains dart:ui could not be imported ...!

Yeah, it will be a much bigger project to get flutter out of there. So probably just add the flutter_test dependency and the tests should run again.

Hwan-seok commented 1 year ago

OK, I replaced the test with flutter_test.