cleanup 3d stuff

This commit is contained in:
2022-08-11 13:43:48 +02:00
parent b46a22539e
commit de769004af
3 changed files with 18 additions and 37 deletions

View File

@@ -17,7 +17,7 @@ pub const PROTOCOL_ID: u64 = 7;
#[derive(Debug, Component)]
pub struct Player {
pub id: u64,
pub location: Vec2,
pub position: Vec2,
}
#[derive(Debug, Default, Clone, Copy, Serialize, Deserialize, Component)]
@@ -31,7 +31,7 @@ pub struct PlayerInput {
#[derive(Debug, Serialize, Deserialize, Component)]
pub enum PlayerCommand {
BasicAttack { cast_at: Vec2 },
BasicAttack { fired_at: Vec2 },
}
pub enum ClientChannel {
@@ -49,14 +49,13 @@ pub enum ServerMessages {
PlayerCreate {
entity: Entity,
id: u64,
translation: [f32; 3],
},
PlayerRemove {
id: u64,
},
SpawnProjectile {
entity: Entity,
location: Vec2,
position: Vec2,
direction: Vec2,
},
DespawnProjectile {