use crate::state::Uid; use specs::{Component, FlaggedStorage}; use specs_idvs::IDVStorage; use std::time::Duration; #[derive(Clone, Debug, Serialize, Deserialize)] pub enum Effect { Damage(u32), Vanish, Stick, Possess, } #[derive(Clone, Debug, Serialize, Deserialize)] pub struct Projectile { pub owner: Option, pub hit_ground: Vec, pub hit_wall: Vec, pub hit_entity: Vec, /// Time left until the projectile will despawn pub time_left: Duration, } impl Component for Projectile { type Storage = FlaggedStorage>; }