From 26e2eddd1efeb0a5fff8ffabebefdae48c4a65dc Mon Sep 17 00:00:00 2001 From: Silas Bartha Date: Thu, 21 Nov 2024 12:17:44 -0500 Subject: Thu Nov 21 12:17:44 PM EST 2024 --- src/payload/mod.rs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/payload/mod.rs (limited to 'src/payload/mod.rs') diff --git a/src/payload/mod.rs b/src/payload/mod.rs new file mode 100644 index 0000000..483fee5 --- /dev/null +++ b/src/payload/mod.rs @@ -0,0 +1,27 @@ +use serde::{Deserialize, Serialize}; +use uuid::Uuid; + +pub mod components; + +#[derive(Serialize, Deserialize, Default, Clone, Debug)] +pub struct DirworldEntityPayload { + pub id: Uuid, + pub transform: components::Transform, + pub name: Option, + pub actor: Option, + pub voice: Option, + pub rigidbody: Option, + pub mesh_collider: Option, + pub scripts: Option>, + pub relationships: Option, +} + +impl DirworldEntityPayload { + pub fn new() -> Self { + Self { + id: Uuid::new_v4(), + ..Default::default() + } + } +} + -- cgit v1.2.3