pub enum BehaviorSource {
Start,
Tick,
Timer {
interval: f32,
repeat: bool,
},
Variable(String),
Enter(Option<AssetId>),
Exit(Option<AssetId>),
Interact(Option<AssetId>),
Spawned,
}Expand description
The event that fires a Behavior.
Variants§
Start
Fires once when the world starts.
Tick
Fires every tick.
Timer
Fires when interval seconds have elapsed; with repeat, every
interval seconds.
Fields
Variable(String)
Fires whenever the named world variable changes value.
Enter(Option<AssetId>)
Fires when something enters the named TriggerVolume.
Exit(Option<AssetId>)
Fires when something leaves the named TriggerVolume.
Interact(Option<AssetId>)
Fires when the interact key is pressed on the named entity (a
Prop declared interactable).
Spawned
Fires on an entity the tick after it spawns.
Trait Implementations§
Source§impl Clone for BehaviorSource
impl Clone for BehaviorSource
Source§fn clone(&self) -> BehaviorSource
fn clone(&self) -> BehaviorSource
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 BehaviorSource
impl Debug for BehaviorSource
Source§impl Default for BehaviorSource
impl Default for BehaviorSource
Source§fn default() -> BehaviorSource
fn default() -> BehaviorSource
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for BehaviorSource
impl<'de> Deserialize<'de> for BehaviorSource
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<BehaviorSource, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<BehaviorSource, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for BehaviorSource
impl PartialEq for BehaviorSource
Source§impl Serialize for BehaviorSource
impl Serialize for BehaviorSource
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for BehaviorSource
Auto Trait Implementations§
impl Freeze for BehaviorSource
impl RefUnwindSafe for BehaviorSource
impl Send for BehaviorSource
impl Sync for BehaviorSource
impl Unpin for BehaviorSource
impl UnsafeUnpin for BehaviorSource
impl UnwindSafe for BehaviorSource
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