Enum netsblox_vm::runtime::Command
source · pub enum Command<'gc, 'a, C: CustomTypes<S>, S: System<C>> {
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,
SetCostume {
costume: Option<Rc<Vec<u8>>>,
},
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.
SetCostume
Sets the costume on the entity. This should essentially assigns the costume to Entity::costume,
but is treated as a system command so that custom code can be executed when an entity switches costumes.
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.