From e1eccd2f9e0991ea23bc75384b9987ce0eec5e66 Mon Sep 17 00:00:00 2001 From: Evan Pratten Date: Sat, 2 Apr 2022 00:07:03 -0400 Subject: [PATCH] json backings --- game/game_logic/src/model/world_object.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/game/game_logic/src/model/world_object.rs b/game/game_logic/src/model/world_object.rs index 44ef9a46..ceb0fe9c 100644 --- a/game/game_logic/src/model/world_object.rs +++ b/game/game_logic/src/model/world_object.rs @@ -9,6 +9,17 @@ pub struct PossiblyAnimatedTexture { pub rel_file_path: String, } + +#[derive(Debug, Clone, Deserialize)] +pub struct ObjectCollider { + /// Position, relative to the object's center (north east is 1,1 south west is -1,-1) + pub position: na::Vector2, + /// Possible sizing + pub size: Option>, + /// Possible radius + pub radius: Option, +} + #[derive(Debug, Clone, Deserialize)] pub struct WorldObject { /// Object name. Must match the name of the texture @@ -23,4 +34,10 @@ pub struct WorldObject { pub bottom_texture: PossiblyAnimatedTexture, /// The object's top texture pub top_texture: Option, + /// colliders describing the object's footprint + pub footprint: Vec, + /// Colliders for physics + pub physics_colliders: Vec, + /// Temperature + pub temperature: Option, }