pub struct Goal {
pub id: String,
pub name: String,
pub description: String,
pub group: GoalGroup,
pub activate_when: Option<GoalCondition>,
pub finished_when: GoalCondition,
pub failed_when: Option<GoalCondition>,
}Expand description
A goal for the player to achieve.
Fields§
§id: String§name: String§description: String§group: GoalGroup§activate_when: Option<GoalCondition>§finished_when: GoalCondition§failed_when: Option<GoalCondition>Implementations§
Source§impl Goal
impl Goal
Sourcepub fn status(&self, world: &AmbleWorld) -> GoalStatus
pub fn status(&self, world: &AmbleWorld) -> GoalStatus
Determines and returns the current ‘GoalStatus’ for this goal.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Goal
impl<'de> Deserialize<'de> for Goal
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 Freeze for Goal
impl RefUnwindSafe for Goal
impl Send for Goal
impl Sync for Goal
impl Unpin for Goal
impl UnsafeUnpin for Goal
impl UnwindSafe for Goal
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