pub struct SkillInstance<S> {
pub skill_key: S,
pub current_cooldown: f64,
}
Expand description
An instance of a skill. There is one per skill per entity that can use it. Holds the cooldown for each skill.
Fields§
§skill_key: S
The skill key.
current_cooldown: f64
The remaining time to wait before we can use this skill again.
Implementations§
Trait Implementations§
Source§impl<S: Clone> Clone for SkillInstance<S>
impl<S: Clone> Clone for SkillInstance<S>
Source§fn clone(&self) -> SkillInstance<S>
fn clone(&self) -> SkillInstance<S>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<S: Debug> Debug for SkillInstance<S>
impl<S: Debug> Debug for SkillInstance<S>
Source§impl<'de, S> Deserialize<'de> for SkillInstance<S>where
S: Deserialize<'de>,
impl<'de, S> Deserialize<'de> for SkillInstance<S>where
S: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<S> Freeze for SkillInstance<S>where
S: Freeze,
impl<S> RefUnwindSafe for SkillInstance<S>where
S: RefUnwindSafe,
impl<S> Send for SkillInstance<S>where
S: Send,
impl<S> Sync for SkillInstance<S>where
S: Sync,
impl<S> Unpin for SkillInstance<S>where
S: Unpin,
impl<S> UnwindSafe for SkillInstance<S>where
S: UnwindSafe,
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