Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Tiled component is positionable #1900

Merged
merged 4 commits into from
Sep 15, 2022

Conversation

jtmcdole
Copy link
Contributor

@jtmcdole jtmcdole commented Sep 11, 2022

Description

Update TiledComponent to extend PositionComponent instead of Component. With some quirks:

  1. Size is computed from the Map and not settable. I've made these operations fail silently for now.
  2. Width and Height setters by proxy are ignored.
  3. Scale does work

Checklist

  • The title of my PR starts with a [Conventional Commit] prefix (fix:, feat:, docs: etc).
  • I have read the [Contributor Guide] and followed the process outlined for submitting PRs.
  • I have updated/added tests for ALL new/updated/fixed functionality.
  • I have updated/added relevant documentation in docs and added dartdoc comments with ///.
  • I have updated/added relevant examples in examples.

Breaking Change

  • Yes, this is a breaking change.
  • No, this is not a breaking change.

I do not believe this is breaking, since tests are still passing. It is only adding functionality to TiledComponent.

Related Issues

Fixes #1890

@jtmcdole jtmcdole force-pushed the tiledComponentIsPositionable branch 2 times, most recently from ce5bf54 to 1769f96 Compare September 13, 2022 04:08
@spydon
Copy link
Member

spydon commented Sep 13, 2022

#1895 is now merged :)

TiledMapComponents should be able to be positioned, angled, etc.
The only thing the can't do is change their size except via scale.

Fixes flame-engine#1890
@jtmcdole
Copy link
Contributor Author

#1895 is now merged :)

updated - took a bit to unbork the stack (dear future self: git rebase --onto main tiledComponentIsPositionable~ tiledComponentIsPositionable does the trick)

@jtmcdole
Copy link
Contributor Author

recorded from chrome (obs was choppy - animation is great):
https://user-images.githubusercontent.com/1924313/189997161-ac7f9ee7-55c2-4963-87b2-00174ab5b1ff.mp4

packages/flame_tiled/lib/src/tiled_component.dart Outdated Show resolved Hide resolved
packages/flame_tiled/lib/src/tiled_component.dart Outdated Show resolved Hide resolved
packages/flame_tiled/lib/src/tiled_component.dart Outdated Show resolved Hide resolved
packages/flame_tiled/lib/src/tiled_component.dart Outdated Show resolved Hide resolved
@spydon spydon enabled auto-merge (squash) September 15, 2022 07:26
@spydon spydon merged commit 88cb2a0 into flame-engine:main Sep 15, 2022
@jtmcdole jtmcdole deleted the tiledComponentIsPositionable branch September 15, 2022 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make TiledMapComponent positionable
3 participants