pub trait Scriptable {
// Required methods
fn spawn_script_core(
&mut self,
this: Arc<RwLock<dyn GameObject>>,
spawner: Spawner,
);
fn spawn_script_handler(
&mut self,
this: Arc<RwLock<dyn GameObject>>,
spawner: Spawner,
event: Event<'static, UserEvent<Arc<dyn Any + Send + Sync>>>,
);
fn get_globals(&self) -> Result<Box<dyn Global>, &'static str>;
fn set_globals(
&mut self,
globals: Box<dyn Global>,
) -> Result<(), &'static str>;
}
Expand description
A trait that provides scriptable functionality.