diff options
author | Alexander Foremny <aforemny@posteo.de> | 2024-03-23 15:07:35 +0100 |
---|---|---|
committer | Alexander Foremny <aforemny@posteo.de> | 2024-03-23 15:07:35 +0100 |
commit | 3bfcf00baeb7c0a2e1b45aa9038c80dc24e37214 (patch) | |
tree | 6b62e14b848dd0a37fc96591111475933533ecf9 /src/shared | |
parent | 1219ed9a6c3b7cc978d70e0c62f96e09e8efe04f (diff) |
feat: towers prioritize non-player targets
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/tower.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/shared/tower.rs b/src/shared/tower.rs index a21048a..4601112 100644 --- a/src/shared/tower.rs +++ b/src/shared/tower.rs @@ -64,5 +64,11 @@ impl TowerBundle { #[derive(Component, Default)] pub struct Tower { - pub last_target_player_id: Option<PlayerId>, + pub last_target: Option<LastTarget>, +} + +#[derive(Component, Clone, Copy)] +pub struct LastTarget { + pub entity: Entity, + pub player_id: PlayerId, } |