#[non_exhaustive]pub enum ScriptCommand {
Show 42 variants
SetPosition(u32, Vec3),
SetRotation(u32, Quat),
SetScale(u32, Vec3),
SetVelocity(u32, Vec3),
SetAngularVelocity(u32, Vec3),
ApplyForce(u32, Vec3),
ApplyImpulse(u32, Vec3),
AddRigidBody {
id: u32,
mass: f32,
use_gravity: bool,
},
AddBoxCollider {
id: u32,
hx: f32,
hy: f32,
hz: f32,
},
AddSphereCollider {
id: u32,
radius: f32,
},
SetVehicleEngineForce(u32, f32),
SetVehicleSteering(u32, f32),
SetVehicleBrake(u32, f32),
SpawnEntity {
name: String,
position: Vec3,
},
SpawnPrefab {
name: String,
prefab_type: String,
position: Vec3,
},
DestroyEntity(u32),
PlaySound(String),
PlaySound3D(String, Vec3),
StopSound(String),
LoadScene(String),
SaveScene(String),
ShowDialogue {
speaker: String,
text: String,
duration: f32,
},
HideDialogue,
TriggerCutscene(String),
EndCutscene,
StartRace,
AddCheckpoint {
id: u32,
position: Vec3,
radius: f32,
},
ActivateCheckpoint(u32),
FinishRace {
winner_name: String,
},
ResetRace,
SetCameraTarget(u32),
SetCameraFov(f32),
SetFightCamera {
p1_id: u32,
p2_id: u32,
height: f32,
distance: f32,
},
SetEntityName(u32, String),
PlayAnimation {
id: u32,
name: String,
blend: f32,
loop_anim: bool,
},
SetAnimationSpeed(u32, f32),
AddNavAgent(u32),
SetAiTarget(u32, Vec3),
ClearAiTarget(u32),
SetFighterMove {
id: u32,
name: String,
startup: u32,
active: u32,
recovery: u32,
damage: f32,
},
ApplyHitstop(u32, u32),
ApplyHitstun(u32, u32),
}Expand description
Lua’dan gelen tüm değişiklik istekleri
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
SetPosition(u32, Vec3)
SetRotation(u32, Quat)
SetScale(u32, Vec3)
SetVelocity(u32, Vec3)
SetAngularVelocity(u32, Vec3)
ApplyForce(u32, Vec3)
ApplyImpulse(u32, Vec3)
AddRigidBody
AddBoxCollider
AddSphereCollider
SetVehicleEngineForce(u32, f32)
SetVehicleSteering(u32, f32)
SetVehicleBrake(u32, f32)
SpawnEntity
SpawnPrefab
DestroyEntity(u32)
PlaySound(String)
PlaySound3D(String, Vec3)
StopSound(String)
LoadScene(String)
SaveScene(String)
ShowDialogue
HideDialogue
TriggerCutscene(String)
EndCutscene
StartRace
AddCheckpoint
ActivateCheckpoint(u32)
FinishRace
ResetRace
SetCameraTarget(u32)
SetCameraFov(f32)
SetFightCamera
İki dövüşçüyü aynı anda takip eden fighting camera
SetEntityName(u32, String)
PlayAnimation
SetAnimationSpeed(u32, f32)
SetAiTarget(u32, Vec3)
ClearAiTarget(u32)
SetFighterMove
ApplyHitstop(u32, u32)
ApplyHitstun(u32, u32)
Implementations§
Source§impl ScriptCommand
impl ScriptCommand
Sourcepub fn is_finite(&self) -> bool
pub fn is_finite(&self) -> bool
Does every number this command carries have a finite value?
§Why the queue asks
Lua arithmetic produces NaN and infinity quietly — 0/0, math.huge, a division by a
velocity that happened to be zero — and a script has no reason to notice. Downstream,
nothing recovers: a NaN position makes an entity vanish and every comparison against it
false, a NaN velocity poisons the integrator for that body and then, through contacts, for
whatever it touches, and the determinism hash goes with it. sanitize_dim covered collider
dimensions — one of the eleven variants that carry floats — because that was the one that
had bitten someone.
The match is exhaustive on purpose: no _ arm, so a variant added with a float in it
fails to compile here rather than becoming the next one that was not covered. Variants
carrying no numbers answer true by naming themselves, which is the price of that.
Trait Implementations§
Source§impl Clone for ScriptCommand
impl Clone for ScriptCommand
Source§fn clone(&self) -> ScriptCommand
fn clone(&self) -> ScriptCommand
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ScriptCommand
impl RefUnwindSafe for ScriptCommand
impl Send for ScriptCommand
impl Sync for ScriptCommand
impl Unpin for ScriptCommand
impl UnsafeUnpin for ScriptCommand
impl UnwindSafe for ScriptCommand
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more