fix(app): publish hud every frame and verify rewarded ads on device
This commit is contained in:
@@ -11,6 +11,9 @@ Alle nennenswerten Änderungen an diesem Projekt. Format nach
|
|||||||
- (sim) `MAX_HP` 100 -> 150 (laengere, taktischere Matches); `SIM_VERSION` 0.2.0
|
- (sim) `MAX_HP` 100 -> 150 (laengere, taktischere Matches); `SIM_VERSION` 0.2.0
|
||||||
- (app) Version 0.6.0 (6), HP-Balken gegen `kTankMaxHp`
|
- (app) Version 0.6.0 (6), HP-Balken gegen `kTankMaxHp`
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- (app) HUD blieb auf dem Initialwert (100 HP), weil `onLoad` waehrend des ersten Builds publizierte
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- (ads) AdMob App ID im Manifest, `google_mobile_ads`, `AdsService` mit Rewarded/Interstitial und Frequenz-Caps
|
- (ads) AdMob App ID im Manifest, `google_mobile_ads`, `AdsService` mit Rewarded/Interstitial und Frequenz-Caps
|
||||||
- (ui) Rewarded-Testbutton; Interstitial nach Matchende (ab Match 4, jeder 2.)
|
- (ui) Rewarded-Testbutton; Interstitial nach Matchende (ab Match 4, jeder 2.)
|
||||||
|
|||||||
@@ -113,7 +113,8 @@ class IronArcGame extends FlameGame {
|
|||||||
@override
|
@override
|
||||||
Future<void> onLoad() async {
|
Future<void> onLoad() async {
|
||||||
_match = matchFactory?.call() ?? NativeMatch(seed);
|
_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
|
@override
|
||||||
@@ -135,7 +136,6 @@ class IronArcGame extends FlameGame {
|
|||||||
_accumulator -= step;
|
_accumulator -= step;
|
||||||
steps++;
|
steps++;
|
||||||
}
|
}
|
||||||
_pushHud();
|
|
||||||
} else if (_match.isAiming) {
|
} else if (_match.isAiming) {
|
||||||
_accumulator = 0;
|
_accumulator = 0;
|
||||||
}
|
}
|
||||||
@@ -155,6 +155,9 @@ class IronArcGame extends FlameGame {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
_wasFlying = flying;
|
_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);
|
_updateCamera(dt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user