aboutsummaryrefslogtreecommitdiffstats
path: root/src/shared/projectile.rs
blob: 59dec30da91d06fc2df224b187433b9e039c974a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::shared::*;

#[derive(Bundle)]
pub struct ProjectileBundle {
    pub projectile: Projectile,
    pub position: ProjectilePosition,
    pub replicate: Replicate,
}

#[derive(Component, Message, Serialize, Deserialize, Clone, Debug, PartialEq)]
pub struct Projectile {
    pub target_player: PlayerId,
    pub source_player: PlayerId,
}

#[derive(Component, Message, Serialize, Deserialize, Clone, Debug, PartialEq)]
pub struct ProjectilePosition(pub Vec2);