pub struct AgentProperties {
pub integrity: u16,
pub max_integrity: u16,
pub priority: u16,
pub max_priority: u16,
pub energy: u16,
pub max_energy: u16,
pub priority_regen_per_s: u16,
pub energy_regen_per_s: u16,
}Expand description
Basic properties for any agent entity.
NOTE: Zero values in maxima (max_integrity, max_priority, max_energy) represent an uninitialized
or dead state. Logic that performs divisions or percentage calculations must verify
non-zero maxima.
Fields§
§integrity: u16§max_integrity: u16§priority: u16§max_priority: u16§energy: u16§max_energy: u16§priority_regen_per_s: u16§energy_regen_per_s: u16Trait Implementations§
Source§impl Clone for AgentProperties
impl Clone for AgentProperties
Source§fn clone(&self) -> AgentProperties
fn clone(&self) -> AgentProperties
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AgentProperties
impl Debug for AgentProperties
Source§impl Default for AgentProperties
impl Default for AgentProperties
Source§impl<'de> Deserialize<'de> for AgentProperties
impl<'de> Deserialize<'de> for AgentProperties
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
Source§impl Serialize for AgentProperties
impl Serialize for AgentProperties
impl Copy for AgentProperties
Auto Trait Implementations§
impl Freeze for AgentProperties
impl RefUnwindSafe for AgentProperties
impl Send for AgentProperties
impl Sync for AgentProperties
impl Unpin for AgentProperties
impl UnsafeUnpin for AgentProperties
impl UnwindSafe for AgentProperties
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