Lifecycle Events
Signal preloader progress and active gameplay states to BentoTiles.
Game Lifecycle Events
Signaling lifecycle events allows BentoTiles to optimize player loading screens, measure accurate play session durations, and pause background portal animations during active gameplay.
⏳ Preloader Progress
Notify the platform as your game assets (textures, audio files, asset bundles) load:
// Call when preloader starts
BentoTiles.gameLoadingStart();
// Report progress percentage (0 - 100)
BentoTiles.gameLoadingProgress({ percentage: 25 });
BentoTiles.gameLoadingProgress({ percentage: 75 });
// Call when all game assets are loaded and main menu is ready
BentoTiles.gameLoadingFinished();🎮 Gameplay State
Inform BentoTiles when active gameplay starts or stops:
// Call when player clicks "Start Game" or enters a level
BentoTiles.gameplayStart();
// Call when player dies, returns to main menu, or completes game
BentoTiles.gameplayStop();