pub struct ObjectiveNode {Show 17 fields
pub id: u64,
pub position: Vec2,
pub objective_id: String,
pub objective: QuestObjective,
pub input_port: u64,
pub success_port: u64,
pub failure_port: Option<u64>,
pub optional: bool,
pub secret: bool,
pub journal_entry_on_start: Option<String>,
pub journal_entry_on_complete: Option<String>,
pub map_markers: Vec<MapMarker>,
pub time_limit: Option<f32>,
pub elapsed_time: f32,
pub tags: Vec<String>,
pub comment: String,
pub completion_xp_bonus: u32,
}Fields§
§id: u64§position: Vec2§objective_id: String§objective: QuestObjective§input_port: u64§success_port: u64§failure_port: Option<u64>§optional: bool§secret: bool§journal_entry_on_start: Option<String>§journal_entry_on_complete: Option<String>§map_markers: Vec<MapMarker>§time_limit: Option<f32>§elapsed_time: f32§comment: String§completion_xp_bonus: u32Implementations§
Source§impl ObjectiveNode
impl ObjectiveNode
pub fn new(id: u64, objective: QuestObjective) -> Self
pub fn update( &mut self, delta: f32, events: &[QuestEvent], ) -> ObjectiveNodeResult
pub fn time_remaining(&self) -> Option<f32>
pub fn progress_display(&self) -> String
Trait Implementations§
Source§impl Clone for ObjectiveNode
impl Clone for ObjectiveNode
Auto Trait Implementations§
impl Freeze for ObjectiveNode
impl RefUnwindSafe for ObjectiveNode
impl Send for ObjectiveNode
impl Sync for ObjectiveNode
impl Unpin for ObjectiveNode
impl UnsafeUnpin for ObjectiveNode
impl UnwindSafe for ObjectiveNode
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.