Expand description
ScriptApiRegistrar trait — enables game-agnostic JS API registration.
The core engine registers generic APIs (showText, moveNpc, getFlag, warpTo, etc.)
on the game global object. Game-specific APIs (giveMonster, startBattle, etc.)
are registered by implementors of this trait via ScriptEngine::with_api().
DSL scene management APIs (showScene, hideScene, updateUI) are registered as
core APIs during ScriptEngine::new().
Traits§
- Script
ApiRegistrar - Trait for registering game-specific JavaScript APIs.
Functions§
- register_
hide_ scene - Register the
game.hideScene()JS API on the given engine. - register_
show_ scene - Register the
game.showScene()JS API on the given engine. - register_
update_ ui - Register the
game.updateUI()JS API on the given engine.