pub enum Event {
OnFlag,
OnClone,
LocalMessage {
msg_type: Option<CompactString>,
},
NetworkMessage {
msg_type: CompactString,
fields: Vec<CompactString>,
},
OnKey {
key_filter: Option<KeyCode>,
},
Custom {
name: CompactString,
fields: Vec<CompactString>,
},
}
Expand description
An event type which can be set to trigger the execution of a script.
Variants§
OnFlag
Fire when a green flag click event is issued.
OnClone
Fire when a new clone of this entity is created.
LocalMessage
Fire when a message is received locally (Control message blocks). None
is used to denote any message type.
Fields
§
msg_type: Option<CompactString>
NetworkMessage
Fire when a message is received over the network (Network message blocks).
OnKey
Fire when a key is pressed. None
is used to denote any key press.
Custom
Fire when explicitly requested from an input command.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Event
impl<'de> Deserialize<'de> for Event
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 Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnwindSafe for Event
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