fix(app): publish hud every frame and verify rewarded ads on device
This commit is contained in:
@@ -113,7 +113,8 @@ class IronArcGame extends FlameGame {
|
||||
@override
|
||||
Future<void> onLoad() async {
|
||||
_match = matchFactory?.call() ?? NativeMatch(seed);
|
||||
_pushHud();
|
||||
// Do not publish here: notifying listeners during the first build is lost.
|
||||
// The first update() call publishes the loaded state on the next frame.
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -135,7 +136,6 @@ class IronArcGame extends FlameGame {
|
||||
_accumulator -= step;
|
||||
steps++;
|
||||
}
|
||||
_pushHud();
|
||||
} else if (_match.isAiming) {
|
||||
_accumulator = 0;
|
||||
}
|
||||
@@ -155,6 +155,9 @@ class IronArcGame extends FlameGame {
|
||||
}
|
||||
}
|
||||
_wasFlying = flying;
|
||||
// Publish every frame: the notifier only fires on real changes, and this
|
||||
// guarantees the first painted frame already shows the loaded match state.
|
||||
_pushHud();
|
||||
_updateCamera(dt);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user