diff options
| author | Mica White <botahamec@outlook.com> | 2026-07-10 19:42:23 -0400 |
|---|---|---|
| committer | Mica White <botahamec@outlook.com> | 2026-07-10 19:42:23 -0400 |
| commit | 7aa6566796e1632ae36277648c162fc77af7052b (patch) | |
| tree | 1f8362c44329acd519eb1c19cc65a3729e50313a /examples/snake.rs | |
| parent | a9977e7fabeb06a6f21824cc4a41b36ea39f6799 (diff) | |
State utilities
Diffstat (limited to 'examples/snake.rs')
| -rw-r--r-- | examples/snake.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/examples/snake.rs b/examples/snake.rs index d14618e..927fc86 100644 --- a/examples/snake.rs +++ b/examples/snake.rs @@ -11,6 +11,7 @@ use tortuise::{ input::InputManager, scene::{ResourceRequirements, Scene, switch_scenes}, script::{ScriptContext, ScriptDeclaration, ScriptManager, WasmRunner}, + storage::StorageManager, time::TimeContext, }; @@ -139,12 +140,19 @@ fn main() { let wasm_runner = WasmRunner::new(); let mut scripts = ScriptManager::new(&manifest.scripts); let mut time = TimeContext::new(); + let mut storage = StorageManager::load(etcetera::AppStrategyArgs { + top_level_domain: "com".into(), + author: "botahamec".into(), + app_name: "Snake".into(), + }) + .unwrap(); let mut context = ScriptContext { manifest: &manifest, buffer: &mut buffer, input: &input, time: &time, + storage: &mut storage, operation_queue: Vec::new(), }; switch_scenes( @@ -166,6 +174,7 @@ fn main() { let mut context = ScriptContext { manifest: &manifest, buffer, + storage: &mut storage, input: &input, time: &time, operation_queue: Vec::new(), |
