diff --git a/routes-native/src/stateserver.rs b/routes-native/src/stateserver.rs index 92ed86f..cbc06d7 100644 --- a/routes-native/src/stateserver.rs +++ b/routes-native/src/stateserver.rs @@ -1,11 +1,19 @@ use gdnative::prelude::*; use lazy_static::lazy_static; +use pathfinding::matrix; use tokio::sync::RwLock; mod terrain; +mod pathing; + +enum Tiles { + terrain(terrain::Terrain), + path(pathing::Path) + +} lazy_static! { - // static ref STATE: RwLock = RwLock::new(Vector3::new(1.0, 2.0, 3.0)); + static ref STATE: RwLock>> = RwLock::new(matrix![]); } #[derive(NativeClass)] diff --git a/routes-native/src/stateserver/pathing.rs b/routes-native/src/stateserver/pathing.rs new file mode 100644 index 0000000..e409cf5 --- /dev/null +++ b/routes-native/src/stateserver/pathing.rs @@ -0,0 +1,5 @@ +use pathfinding::prelude::astar; + +pub enum Path { + +} diff --git a/routes-native/src/stateserver/terrain.rs b/routes-native/src/stateserver/terrain.rs index f4f5d1b..6fd11be 100644 --- a/routes-native/src/stateserver/terrain.rs +++ b/routes-native/src/stateserver/terrain.rs @@ -1,6 +1,6 @@ use gdnative::prelude::*; #[derive(Debug, FromVariant, ToVariant)] -enum Terrain { +pub enum Terrain { Earth, Rock, Sand,