pub struct Weapon {
pub target: TargetType,
pub damage: u32,
pub damage_bonus: Vec<(Attribute, u32)>,
pub attacks: u32,
pub range: f32,
pub speed: f32,
}
Expand description
Weapon’s characteristic.
Fields§
§target: TargetType
Possible targets.
damage: u32
Usual damage.
damage_bonus: Vec<(Attribute, u32)>
Addidional damage vs units with specific attribute.
attacks: u32
Number of attacks per use.
range: f32
Maximum range.
speed: f32
Cooldown (in seconds * game speed).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Weapon
impl RefUnwindSafe for Weapon
impl Send for Weapon
impl Sync for Weapon
impl Unpin for Weapon
impl UnwindSafe for Weapon
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more