PointClickEngine::Scripting::ScriptEngine
Inherits Reference < Object
Main script engine using component-based architecture
This refactored ScriptEngine delegates responsibilities to specialized components:
- LuaEnvironment: Lua setup and utility functions
- ScriptAPIRegistry: Crystal function registration
- SceneScriptAPI: Scene-related Lua API
- CharacterScriptAPI: Character-related Lua API
- InventoryScriptAPI: Inventory management Lua API
- DialogScriptAPI: Dialog system Lua API
- UtilityScriptAPI: Game state, timers, sequences, quests Lua API
- CameraScriptAPI: Camera control Lua API
- AudioScriptAPI: Audio control Lua API
- HotspotScriptAPI: Hotspot interaction Lua API
- LuaStateManager: Script-accessible Lua state
EventBus Integration: Scripts register Lua handlers (e.g., scene.on_enter, hotspot.on_click) ScriptEngine subscribes to EventBus events and calls the Lua handlers
Constructors
new
SourceInstance methods
lua
Sourcesubscribe_to_events(event_bus : Core::Events::EventBus)
Subscribe to EventBus events - call this after engine is initialized