diff options
| author | Micha White <botahamec@outlook.com> | 2023-11-08 14:09:17 -0500 |
|---|---|---|
| committer | Micha White <botahamec@outlook.com> | 2023-11-08 14:09:17 -0500 |
| commit | 279c233cb1f32ed42419ed6a9c2e14c1c1bc80e7 (patch) | |
| tree | b72aee1d6363b3e65dcd20581590f902a88fbc0a /scripts/src/vtable.rs | |
| parent | 1ec2599c45a51dde87496edce7cd3ab301a18539 (diff) | |
Create a script system
Diffstat (limited to 'scripts/src/vtable.rs')
| -rw-r--r-- | scripts/src/vtable.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/src/vtable.rs b/scripts/src/vtable.rs new file mode 100644 index 0000000..0fbb324 --- /dev/null +++ b/scripts/src/vtable.rs @@ -0,0 +1,10 @@ +/// A trait for scripts +pub trait ScriptTable: Send + Sync { + /// This is called whenever the script is enabled + fn begin(&mut self); + + /// This is called every frame + fn update(&mut self); +} + +pub type VTableScript = &'static mut dyn ScriptTable; |
