ammo system
* heads have abilities * health and ammo shows in ui
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use super::AimState;
|
||||
use crate::{
|
||||
GameState,
|
||||
backpack::BackpackHead,
|
||||
backpack::UiHeadState,
|
||||
heads_ui::HeadsImages,
|
||||
loading_assets::UIAssets,
|
||||
npc::{Hitpoints, NpcHead},
|
||||
@@ -18,7 +18,7 @@ struct HeadDamage;
|
||||
|
||||
#[derive(Resource, Default, PartialEq)]
|
||||
struct TargetUi {
|
||||
head: Option<BackpackHead>,
|
||||
head: Option<UiHeadState>,
|
||||
}
|
||||
|
||||
pub fn plugin(app: &mut App) {
|
||||
@@ -150,7 +150,7 @@ fn sync(
|
||||
let mut new_state = None;
|
||||
if let Some(e) = aim.target {
|
||||
if let Ok((hp, head)) = target_data.get(e) {
|
||||
new_state = Some(BackpackHead {
|
||||
new_state = Some(UiHeadState {
|
||||
head: head.0,
|
||||
health: hp.health(),
|
||||
ammo: 1.,
|
||||
|
||||
Reference in New Issue
Block a user