pub enum Command<'gc, 'a, C: CustomTypes<S>, S: System<C>> {
Show 14 variants
Print {
style: PrintStyle,
value: Option<Value<'gc, C, S>>,
},
SetProperty {
prop: Property,
value: Value<'gc, C, S>,
},
ChangeProperty {
prop: Property,
delta: Value<'gc, C, S>,
},
ClearEffects,
ClearDrawings,
SetCostume,
PlaySound {
sound: Rc<Audio>,
blocking: bool,
},
PlayNotes {
notes: Vec<Note>,
beats: Number,
blocking: bool,
},
StopSounds,
GotoXY {
x: Number,
y: Number,
},
GotoEntity {
target: &'a Entity<'gc, C, S>,
},
PointTowardsXY {
x: Number,
y: Number,
},
PointTowardsEntity {
target: &'a Entity<'gc, C, S>,
},
Forward {
distance: Number,
},
}
Expand description
A non-value-returning command issued from the runtime.
Variants§
SetProperty
Set an entity property to a specific value.
ChangeProperty
Apply a relative change to the value of an entity property.
ClearEffects
Clear all graphic effects on the entity. This is equivalent to setting all the graphic effect properties to zero.
ClearDrawings
Clear all drawings made by all sprites.
SetCostume
Sets the costume on the entity.
At this point the costume has already been assigned to Entity::costume
,
so this is just a hook for any custom update code that is needed for external purposes.
PlaySound
Plays a sound, optionally with a request to block until the sound is finished playing. It is up to the receiver to actually satisfy this blocking aspect, if desired.
PlayNotes
Plays zero or more notes, optionally with a request to block until the notes are finished playing. It is up to the receiver to actually satisfy this blocking aspect, if desired.
StopSounds
Requests to stop playback of all currently-playing sounds.
GotoXY
Moves the entity to a specific location.
GotoEntity
Moves the current entity to the same position as the target entity.
PointTowardsXY
Points the entity towards a specific location.
PointTowardsEntity
Points the current entity towards a target entity.
Forward
Move forward by a given distance. If the distance is negative, move backwards instead.