From a2d9e9746778cd5f589fb00e119c3fa9e5c74b54 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Mon, 5 Aug 2024 17:26:15 -0700 Subject: [PATCH] add reset instruction + physics::Instruction is Clone --- src/physics.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/physics.rs b/src/physics.rs index fd377c6..e3e7ac9 100644 --- a/src/physics.rs +++ b/src/physics.rs @@ -1,4 +1,4 @@ -#[derive(Debug)] +#[derive(Clone,Debug)] pub enum Instruction{ ReplaceMouse(crate::mouse::MouseState,crate::mouse::MouseState), SetNextMouse(crate::mouse::MouseState), @@ -10,7 +10,13 @@ pub enum Instruction{ SetMoveForward(bool), SetJump(bool), SetZoom(bool), + /// Reset: fully replace the physics state. + /// This forgets all inputs and settings which need to be reapplied. + Reset, + /// Restart: Teleport to the start zone. Restart, + /// Spawn: Teleport to a specific mode's spawn + /// Sets current mode & spawn Spawn(crate::gameplay_modes::ModeId,crate::gameplay_modes::StageId), Idle, //Idle: there were no input events, but the simulation is safe to advance to this timestep