pub struct AreMiniGame {Show 15 fields
pub mini_game_type: u32,
pub movement_per_sec: f32,
pub lateral_accel: f32,
pub bump_plane: u32,
pub do_bumping: bool,
pub use_inertia: bool,
pub dof: u32,
pub music: ResRef,
pub far_clip: f32,
pub near_clip: f32,
pub camera_view_angle: f32,
pub player: Option<AreMiniGamePlayer>,
pub mouse: Option<AreMiniGameMouse>,
pub enemies: Vec<AreMiniGameEnemy>,
pub obstacles: Vec<AreMiniGameObstacle>,
}Expand description
Typed view over the ARE MiniGame nested struct.
Fields§
§mini_game_type: u32Mini-game type (Type): 1 = swoop, 2 = turret.
movement_per_sec: f32Movement speed (MovementPerSec).
lateral_accel: f32Lateral acceleration (LateralAccel).
bump_plane: u32Bump plane index (Bump_Plane).
do_bumping: boolBumping enabled (DoBumping).
use_inertia: boolInertia enabled (UseInertia).
dof: u32Degrees of freedom (DOF).
music: ResRefMusic resref (Music).
far_clip: f32Far clip distance (Far_Clip).
near_clip: f32Near clip distance (Near_Clip).
camera_view_angle: f32Camera view angle (CameraViewAngle).
player: Option<AreMiniGamePlayer>Player sub-struct (Player).
mouse: Option<AreMiniGameMouse>Mouse axis settings (Mouse), when the area carries the struct.
A sibling of Player, not a child of it. One vanilla minigame area of
four has it.
Option rather than a defaulted value, because presence and default
are different questions for a struct. A default answers what the
engine substitutes for an absent scalar; it says nothing about whether
a nested struct exists. Materializing an all-zero Mouse for the
three files without one and then writing it back would invent
structure those files never had. MiniGame itself is an Option on
Are for the same reason, so this matches the convention already in
place rather than adding a second one.
What the engine does with an absent Mouse is untraced, which is the
argument for Option rather than against it: preserving the file’s
actual state invents nothing under that ignorance.
enemies: Vec<AreMiniGameEnemy>Enemy list (Enemies), a sibling of Player.
obstacles: Vec<AreMiniGameObstacle>Obstacle list (Obstacles), a sibling of Player.
Trait Implementations§
Source§impl Clone for AreMiniGame
impl Clone for AreMiniGame
Source§fn clone(&self) -> AreMiniGame
fn clone(&self) -> AreMiniGame
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 AreMiniGame
impl Debug for AreMiniGame
Source§impl Default for AreMiniGame
impl Default for AreMiniGame
Source§impl PartialEq for AreMiniGame
impl PartialEq for AreMiniGame
Source§fn eq(&self, other: &AreMiniGame) -> bool
fn eq(&self, other: &AreMiniGame) -> bool
self and other values to be equal, and is used by ==.