2019-09-26 16:48:37 +00:00
|
|
|
use specs::{Component, FlaggedStorage};
|
2019-09-17 12:43:19 +00:00
|
|
|
use specs_idvs::IDVStorage;
|
|
|
|
|
|
|
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
|
|
|
pub enum Effect {
|
|
|
|
Damage(u32),
|
|
|
|
Vanish,
|
2019-09-28 19:35:28 +00:00
|
|
|
Stick,
|
2019-09-17 12:43:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
|
|
|
pub struct Projectile {
|
|
|
|
pub hit_ground: Vec<Effect>,
|
2019-09-29 08:37:07 +00:00
|
|
|
pub hit_wall: Vec<Effect>,
|
2019-09-17 12:43:19 +00:00
|
|
|
pub hit_entity: Vec<Effect>,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Component for Projectile {
|
|
|
|
type Storage = FlaggedStorage<Self, IDVStorage<Self>>;
|
|
|
|
}
|