pub struct AreMiniGamePlayer {Show 19 fields
pub vehicle: AreMiniGameVehicle,
pub camera: ResRef,
pub camera_rotate: bool,
pub minimum_speed: f32,
pub maximum_speed: f32,
pub accel_secs: f32,
pub tunnel_x_pos: f32,
pub tunnel_x_neg: f32,
pub tunnel_y_pos: f32,
pub tunnel_y_neg: f32,
pub tunnel_z_pos: f32,
pub tunnel_z_neg: f32,
pub tunnel_infinite: [f32; 3],
pub start_offset_x: f32,
pub start_offset_y: f32,
pub start_offset_z: f32,
pub target_offset_x: f32,
pub target_offset_y: f32,
pub target_offset_z: f32,
}Expand description
Typed view over the MiniGame.Player sub-struct.
Fields§
§vehicle: AreMiniGameVehicleThe vehicle fields shared with every enemy.
camera: ResRefCamera resref (Camera) - only used for turret type (type 2).
camera_rotate: boolCamera rotation flag (CameraRotate).
minimum_speed: f32Lower speed bound (Minimum_Speed).
Default -1.0, a sentinel: the engine applies the value only when it
is at or above zero, so a negative bound leaves the constructed one.
maximum_speed: f32Upper speed bound (Maximum_Speed), default 100.0.
Gated the same way as Self::minimum_speed, which for a default of
100.0 means the gate never rejects it.
accel_secs: f32Seconds to accelerate across the speed range (Accel_Secs).
The engine keeps only the acceleration it derives from this and the
two speed bounds, never the field itself, and the derivation has three
branches: exactly 0.0 gives the full speed range as the rate, a
negative value skips the derivation, and anything else divides the
range by it. The view models the file’s value, since that is what the
file holds and what a caller edits.
tunnel_x_pos: f32Positive-X track boundary (TunnelXPos).
tunnel_x_neg: f32Negative-X track boundary (TunnelXNeg).
tunnel_y_pos: f32Positive-Y track boundary (TunnelYPos).
tunnel_y_neg: f32Negative-Y track boundary (TunnelYNeg).
tunnel_z_pos: f32Positive-Z track boundary (TunnelZPos).
tunnel_z_neg: f32Negative-Z track boundary (TunnelZNeg).
tunnel_infinite: [f32; 3]Per-axis flags for an unbounded tunnel (TunnelInfinite).
A GFF vector rather than three floats, unlike the bounds it modifies.
start_offset_x: f32Start position X offset (Start_Offset_X).
The engine assembles the three into one vector and feeds it to the vehicle’s origin. They stay three fields here because that is how the file stores them.
start_offset_y: f32Start position Y offset (Start_Offset_Y).
start_offset_z: f32Start position Z offset (Start_Offset_Z).
target_offset_x: f32Camera target X offset (Target_Offset_X).
Three independent floats, and not assembled into a vector the way the start offsets are.
target_offset_y: f32Camera target Y offset (Target_Offset_Y).
target_offset_z: f32Camera target Z offset (Target_Offset_Z).
Implementations§
Source§impl AreMiniGamePlayer
impl AreMiniGamePlayer
Sourcepub const PARTS: &'static [&'static [Field]]
pub const PARTS: &'static [&'static [Field]]
This type’s schema in parts, which is what a container holding it references.
Own fields first, then one part per flattened child in the order they are declared.
Sourcepub fn read_declared(root: &GffStruct) -> Self
pub fn read_declared(root: &GffStruct) -> Self
Reads every declared field off root.
Absent fields take the entry’s own answer, so a fallback is derived from the declaration rather than restated beside it.
A field declaring a hand-written read is left at that answer for the view to overwrite.
Sourcepub fn write_declared(&self, root: &mut GffStruct)
pub fn write_declared(&self, root: &mut GffStruct)
Writes every declared field onto root, leaving out the ones
their entry says the engine’s own writer leaves out.
A field declaring a hand-written write is not touched here.
Sourcepub fn read_element(structure: &GffStruct) -> Self
pub fn read_element(structure: &GffStruct) -> Self
Reads one element of a list of this type.
Sourcepub fn write_element(&self, structure: &mut GffStruct)
pub fn write_element(&self, structure: &mut GffStruct)
Writes one element of a list of this type.
Trait Implementations§
Source§impl Clone for AreMiniGamePlayer
impl Clone for AreMiniGamePlayer
Source§fn clone(&self) -> AreMiniGamePlayer
fn clone(&self) -> AreMiniGamePlayer
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AreMiniGamePlayer
impl Debug for AreMiniGamePlayer
Source§impl Default for AreMiniGamePlayer
impl Default for AreMiniGamePlayer
Source§impl HasSchema for AreMiniGamePlayer
impl HasSchema for AreMiniGamePlayer
Source§impl PartialEq for AreMiniGamePlayer
impl PartialEq for AreMiniGamePlayer
Source§fn eq(&self, other: &AreMiniGamePlayer) -> bool
fn eq(&self, other: &AreMiniGamePlayer) -> bool
self and other values to be equal, and is used by ==.