pub enum Effect {
SetVar {
slot: u16,
value: Val,
add: bool,
},
SetLocal {
slot: u16,
value: Val,
add: bool,
},
SetTransform {
entity: Entity,
transform: Transform,
},
Spawn(SpawnEffect),
Despawn(Entity),
Reparent {
child: Entity,
parent: Option<Entity>,
},
Visible(Entity, bool),
Sound(PlayCue),
Scene {
scene: AssetId,
transition: String,
},
Screen(AssetId),
Story(StoryPlayback),
Save,
}Expand description
One world change a behavior asked for, in body order.
Variants§
SetVar
Write a world variable.
Fields
SetLocal
Write one of the instance’s locals.
Fields
SetTransform
Replace an entity’s transform.
Spawn(SpawnEffect)
Copy a template into the world.
Despawn(Entity)
Remove an entity.
Reparent
Move an entity under another parent, or to the root.
Fields
Visible(Entity, bool)
Show or hide an entity.
Sound(PlayCue)
Play an audio cue.
Scene
Load a scene.
Screen(AssetId)
Show a screen.
Story(StoryPlayback)
Drive story playback.
Save
Persist the world’s behavior state.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Effect
impl RefUnwindSafe for Effect
impl Send for Effect
impl Sync for Effect
impl Unpin for Effect
impl UnsafeUnpin for Effect
impl UnwindSafe for Effect
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