This commit is contained in:
TotallyNot 2025-11-03 16:36:45 +01:00
parent e7d6b74aab
commit 35413b563c
Signed by: pyrite
GPG key ID: 7F1BA9170CD35D15
33 changed files with 10238 additions and 1891 deletions

View file

@ -1,29 +1,17 @@
use std::collections::HashMap;
use bevy_ecs::prelude::*;
use crate::{
use proxisim_models::{
bundle::{
player::{Attacker, Player},
weapon::Weapon,
Id, Name,
},
dto::metrics::EntityInfo,
hierarchy::Parent,
player::{Attacker, Player},
weapon::Weapon,
Id, Name, Stages,
};
#[cfg_attr(feature = "json", derive(serde::Serialize))]
#[cfg_attr(feature = "json", serde(tag = "type", rename_all = "snake_case"))]
#[derive(Debug, Clone)]
pub enum EntityInfo {
Player {
name: String,
id: usize,
is_attacker: bool,
},
Weapon {
name: String,
owner: usize,
id: usize,
},
}
use crate::Stages;
#[derive(Resource, Default)]
pub struct EntityRegistry(pub HashMap<Entity, EntityInfo>);