Skip to content

Commit

Permalink
fix: world loading order bug (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
kurtome authored Aug 18, 2024
1 parent b5eef12 commit 2711d39
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ import 'package:leap/src/entities/physical_entity.dart';
mixin HasAnimationGroup on PhysicalEntity {
AnchoredAnimationGroup get animationGroup;

bool get animationFacesLeft => false;
bool animationFacesLeft = false;
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:flame_behaviors/flame_behaviors.dart';
import 'package:leap/leap.dart';

mixin HasDeathAnimation on Entity {
mixin HasDeathAnimation on PositionedEntity {
bool get isDead;
AnchoredAnimationGroup get animationGroup;
}
3 changes: 1 addition & 2 deletions packages/leap/lib/src/leap_game.dart
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,8 @@ class LeapGame<TWorld extends LeapWorld> extends FlameGame<TWorld> {
tiledObjectHandlers: tiledObjectHandlers,
groundTileHandlers: groundTileHandlers,
);
onMapLoaded(_leapMap!);

await world.add(leapMap);
onMapLoaded(_leapMap!);

if (mapTransition != null) {
mapTransition.outro();
Expand Down

0 comments on commit 2711d39

Please sign in to comment.