Trait veloren_rtsim::ai::predicate::Predicate

source ·
pub trait Predicate: Sized + Clone {
    // Required method
    fn should(&mut self, ctx: &mut NpcCtx<'_>) -> bool;

    // Provided methods
    fn chance(self, chance: f32) -> Chance<Self> { ... }
    fn time_hint(&self) -> Option<f32> { ... }
}

Required Methods§

source

fn should(&mut self, ctx: &mut NpcCtx<'_>) -> bool

Provided Methods§

source

fn chance(self, chance: f32) -> Chance<Self>

source

fn time_hint(&self) -> Option<f32>

Hint for when this will be true.

Object Safety§

This trait is not object safe.

Implementors§