pub enum TimelineAction {
Show 30 variants
CameraMoveTo {
target: Vec3,
duration: f32,
},
CameraLookAt {
target: Vec3,
duration: f32,
},
CameraShake {
intensity: f32,
duration: f32,
frequency: f32,
},
CameraZoom {
zoom: f32,
duration: f32,
},
FadeOut {
duration: f32,
color: [f32; 4],
},
FadeIn {
duration: f32,
},
Flash {
color: [f32; 4],
duration: f32,
intensity: f32,
},
SetBloom {
enabled: bool,
intensity: f32,
duration: f32,
},
SetChromaticAberration {
amount: f32,
duration: f32,
},
SetFilmGrain {
amount: f32,
},
SetVignette {
radius: f32,
softness: f32,
intensity: f32,
},
SpawnEntity {
blueprint: String,
position: Vec3,
tag: Option<String>,
},
DespawnTag {
tag: String,
},
PushTag {
tag: String,
force: Vec3,
duration: f32,
},
KillTag {
tag: String,
},
PlaySfx {
name: String,
volume: f32,
position: Option<Vec3>,
},
SetMusicVibe {
vibe: String,
},
SetMasterVolume {
volume: f32,
duration: f32,
},
StopMusic,
Dialogue {
speaker: String,
text: String,
duration: Option<f32>,
},
TitleCard {
text: String,
subtitle: String,
duration: f32,
},
Notify {
text: String,
duration: f32,
},
HideDialogue,
Wait {
duration: f32,
},
GotoLabel {
label: String,
},
SetFlag {
name: String,
value: bool,
},
IfFlag {
name: String,
then: Box<TimelineAction>,
},
Parallel {
actions: Vec<TimelineAction>,
},
Callback {
name: String,
args: HashMap<String, String>,
},
End,
}Expand description
An action that fires at a specific time in the timeline.
Variants§
CameraMoveTo
Move camera to position over duration.
CameraLookAt
Look at a world position.
CameraShake
Shake the camera.
CameraZoom
Set camera zoom.
FadeOut
Fade to black.
FadeIn
Fade in from black.
Flash
Flash screen.
SetBloom
Enable/disable bloom.
SetChromaticAberration
Set chromatic aberration.
SetFilmGrain
Enable film grain.
SetVignette
Set vignette.
SpawnEntity
Spawn an entity blueprint at a position.
DespawnTag
Despawn entities by tag.
PushTag
Apply a force to entities with a tag.
KillTag
Kill all entities with a tag.
PlaySfx
Play a named sound effect.
SetMusicVibe
Set music vibe.
SetMasterVolume
Set master volume.
StopMusic
Stop all music.
Dialogue
Show a dialogue line.
TitleCard
Show a title card (big text center screen).
Notify
Show a HUD notification.
HideDialogue
Hide all dialogue.
Wait
Wait (no-op — used as a marker for script pauses).
GotoLabel
Jump playhead to a named label.
SetFlag
Set a flag variable.
IfFlag
Conditional: only fire then if flag is true.
Parallel
Fire multiple actions simultaneously.
Fields
actions: Vec<TimelineAction>Callback
Custom callback by name (engine resolves at runtime).
End
End the timeline.
Trait Implementations§
Source§impl Clone for TimelineAction
impl Clone for TimelineAction
Source§fn clone(&self) -> TimelineAction
fn clone(&self) -> TimelineAction
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for TimelineAction
impl RefUnwindSafe for TimelineAction
impl Send for TimelineAction
impl Sync for TimelineAction
impl Unpin for TimelineAction
impl UnsafeUnpin for TimelineAction
impl UnwindSafe for TimelineAction
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.