pub struct FrameBulk {
pub auto_actions: AutoActions,
pub movement_keys: MovementKeys,
pub action_keys: ActionKeys,
pub frame_time: String,
pub pitch: Option<f32>,
pub frame_count: NonZeroU32,
pub console_command: Option<String>,
}
Expand description
Represents a number of similar frames.
Fields§
§auto_actions: AutoActions
Automatic actions such as strafing, auto-jump, etc.
movement_keys: MovementKeys
Manually specified movement keys.
action_keys: ActionKeys
Manually specified action keys.
frame_time: String
Frame time of each of this frame bulk’s frames.
pitch: Option<f32>
Pitch angle to set.
frame_count: NonZeroU32
Number of frames in this frame bulk.
console_command: Option<String>
The console command to run every frame of this frame bulk.
Implementations§
source§impl FrameBulk
impl FrameBulk
sourcepub fn with_frame_time(frame_time: String) -> Self
pub fn with_frame_time(frame_time: String) -> Self
Returns a FrameBulk
with the given frame time and frame count of 1 and otherwise empty.
§Examples
use hltas::types::FrameBulk;
let frame_bulk = FrameBulk::with_frame_time("0.001".to_owned());
assert_eq!(&frame_bulk.frame_time, "0.001");
assert_eq!(frame_bulk.frame_count.get(), 1);
// The rest is empty.
assert_eq!(frame_bulk.movement_keys.forward, false);
Trait Implementations§
source§impl PartialEq for FrameBulk
impl PartialEq for FrameBulk
impl StructuralPartialEq for FrameBulk
Auto Trait Implementations§
impl Freeze for FrameBulk
impl RefUnwindSafe for FrameBulk
impl Send for FrameBulk
impl Sync for FrameBulk
impl Unpin for FrameBulk
impl UnwindSafe for FrameBulk
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
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)