Struct rusty_sword_arena::game::Weapon [−][src]
pub struct Weapon { pub description: String, pub damage: f32, pub attack_timer: Timer, pub radius: f32, }
A weapon a player may hold
Fields
description: String
Something like "Rusty Sword", "Shiny Sword", "Rusty Spear", etc.
damage: f32
How much damage the weapon can cause
attack_timer: Timer
How long until the player can attack again
radius: f32
How far attacks reach from your player, in OpenGL units.
Methods
impl Weapon
[src]
impl Weapon
Trait Implementations
impl Clone for Weapon
[src]
impl Clone for Weapon
fn clone(&self) -> Weapon
[src]
fn clone(&self) -> Weapon
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Debug for Weapon
[src]
impl Debug for Weapon
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for Weapon
[src]
impl PartialEq for Weapon