Enum assembly_xml::behavior::Action
source · pub enum Action {
OnAttack,
OnEnterProximity {
distance: f32,
},
OnChat {
message: String,
},
PlaySound {
sound: String,
},
Chat {
message: String,
},
Smash {
opacity: f32,
force: f32,
},
Wait {
delay: f32,
},
UnSmash {
duration: f32,
},
MoveToInteractor {
distance: f32,
},
}
Expand description
A single action
Variants§
OnAttack
When the object is attacked
OnEnterProximity
When a player comes close
OnChat
When receiving a chat message
PlaySound
Play a sound
Chat
Send a chat message
Smash
Smash the object
Wait
Wait for some time
UnSmash
Revert a smashing
MoveToInteractor
Move to the interactor
Trait Implementations§
source§impl<'de> Deserialize<'de> for Action
impl<'de> Deserialize<'de> for Action
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 Action
impl RefUnwindSafe for Action
impl Send for Action
impl Sync for Action
impl Unpin for Action
impl UnwindSafe for Action
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)