pub enum COp {
Show 16 variants
If {
cond: CExpr,
then: Vec<CNode>,
otherwise: Vec<CNode>,
},
ForEach {
query: u16,
bind: u16,
body: Vec<CNode>,
},
Let {
bind: u16,
value: CExpr,
},
SetVar {
slot: u16,
value: CExpr,
add: bool,
},
SetLocal {
slot: u16,
value: CExpr,
add: bool,
},
SetTransform {
entity: CExpr,
position: Option<CExpr>,
rotation_deg: Option<CExpr>,
scale: Option<CExpr>,
},
Spawn {
template: AssetId,
position: [f32; 3],
rotation_deg: [f32; 3],
scale: [f32; 3],
lifetime: f32,
bind: Option<u16>,
},
Despawn(CExpr),
Reparent {
child: CExpr,
parent: Option<CExpr>,
},
Visible(CExpr, bool),
Sound {
clip: AudioClipHandle,
kind: CueKind,
volume: f32,
},
Scene {
scene: AssetId,
transition: String,
},
Screen(AssetId),
Story(StoryPlayback),
Save,
Never,
}Expand description
A slot-resolved node operation.
Variants§
If
Run one branch or the other.
Fields
ForEach
Run the body once per entity a declared query selects.
Fields
Let
Introduce a binding for the rest of the enclosing list.
SetVar
Write a world variable.
Fields
SetLocal
Write one of the behavior’s locals.
Fields
SetTransform
Overwrite the named parts of an entity’s transform.
Fields
Spawn
Request a copy of a template.
Fields
Despawn(CExpr)
Request an entity’s removal.
Reparent
Move an entity under another parent, or to the root.
Visible(CExpr, bool)
Show or hide an entity.
Sound
Play an audio cue.
Fields
§
clip: AudioClipHandleThe clip to play.
Scene
Request a scene change.
Screen(AssetId)
Request a screen change.
Story(StoryPlayback)
Drive story playback.
Save
Persist the world’s behavior state.
Never
A node the checker should have rejected. Does nothing.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for COp
impl RefUnwindSafe for COp
impl Send for COp
impl Sync for COp
impl Unpin for COp
impl UnsafeUnpin for COp
impl UnwindSafe for COp
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