use bevy::prelude::*; use serde::{Deserialize, Serialize}; #[derive(Component, Serialize, Deserialize)] /// The primary component for a ship structure pub struct Ship; #[derive(Component, Serialize, Deserialize)] #[relationship_target(relationship = PartInShip, linked_spawn)] pub struct Parts(Vec); #[derive(Component, Serialize, Deserialize)] #[relationship(relationship_target = Parts)] pub struct PartInShip(Entity); #[derive(Component, Serialize, Deserialize)] pub struct Joint { pub transform: Transform } #[derive(Component, Serialize, Deserialize)] pub struct Peer(Entity);