From c8c5e880781343d72671c231be8e132af5e2f344 Mon Sep 17 00:00:00 2001 From: tcmal Date: Sun, 25 Aug 2024 17:44:18 +0100 Subject: Initial Commit. --- stockton-types/src/lib.rs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 stockton-types/src/lib.rs (limited to 'stockton-types/src/lib.rs') diff --git a/stockton-types/src/lib.rs b/stockton-types/src/lib.rs new file mode 100644 index 0000000..259c40c --- /dev/null +++ b/stockton-types/src/lib.rs @@ -0,0 +1,27 @@ +//! Common types for all stockton crates. + +extern crate stockton_bsp; +extern crate nalgebra as na; + +use stockton_bsp::BSPFile; + +pub mod entity_store; +use entity_store::EntityStore; + +/// Alias for convenience +pub type Vector2 = na::base::Vector2; +/// Alias for convenience +pub type Vector3 = na::base::Vector3; + +/// Alias for convenience +pub type Vector2i = na::base::Vector2; + +/// Alias for convenience +pub type Vector3i = na::base::Vector3; + +/// A live and playable world. There are two parts: The map, which has walls and other static objects, +/// and entities, which can move around and do things and are physics simulated. +pub struct World<'a> { + pub map: BSPFile<'a>, + pub live_entities: EntityStore, +} \ No newline at end of file -- cgit v1.2.3