v1.8.0
版本发布时间: 2023-05-29 23:01:19
flame-engine/flame最新发布版本:v1.22.0(2024-11-25 18:46:44)
1.8.0
Note: This release has breaking changes.
- FIX: Update sdk constraints to >=3.0.0 (#2554). (2f71e06e)
- FIX: Reduce the Vector2 creations in Anchor (#2550). (5a9434b0)
- FIX: Fix disappearing text on TextBoxComponent for larger pixelRatios (#2540). (6e1d5466)
- FIX: Avoid the creation of Vector2 objects in Parallax update (#2536). (3849f07d)
- FIX: Solve warnings from 3.10.0 analyzer (#2532). (b41622db)
-
FIX: Move
errorBuilder
andloadingBuilder
to constructors (#2526). (55ec0bc3) -
FEAT: Add onComplete callback to
AnimationWidget
(#2515). (0b68be8a) -
FEAT: Add
stepEngine
toGame
(#2516). (1ed2c5a2) - FEAT: Customise grid of NineTileBox (#2495). (a25b0a03)
-
FEAT: Accept
CollisionType
in hitbox constructor (#2509). (89926227) - DOCS: Update content types of sphinx code snippets (#2519). (306ad320)
-
BREAKING REFACTOR: Move
CameraComponent
and events out of experimental (#2505). (87b8a067) -
BREAKING FEAT: Add
SpriteAnimationTicker
(#2457). (a50c80cf)
Migration instructions
In the future (maybe as early as v1.9.0) this camera will be removed, please use the CameraComponent instead.
This is the simplest way of using the CameraComponent:
-
Add variables for a CameraComponent and a World to your game class
final world = World(); late final CameraComponent cameraComponent;
-
In your
onLoad
method, initialize the cameraComponent and add the world to it.@override void onLoad() { cameraComponent = CameraComponent(world: world); addAll([cameraComponent, world]); }
-
Instead of adding the root components directly to your game with
add
, add them to the world.world.add(yourComponent);
-
(Optional) If you want to add a HUD component, instead of using PositionType, add the component as a child of the viewport.
cameraComponent.viewport.add(yourHudComponent);