pub struct AreMiniGameTargeting {
pub sensing_radius: f32,
pub horiz_spread: f32,
pub vert_spread: f32,
pub inaccuracy: f32,
}Expand description
The AI aiming parameters an enemy gun bank carries.
Flat on the bank entry, siblings of Bullet rather than fields inside it,
and read only for enemies: the player’s own guns never carry them. Grouped
here because they are one concept and because the grouping is what lets
the bank say “this is an enemy’s” without a separate flag.
Fields§
§sensing_radius: f32How far the bank looks for a target (Sensing_Radius).
horiz_spread: f32Horizontal firing arc (Horiz_Spread).
vert_spread: f32Vertical firing arc (Vert_Spread).
inaccuracy: f32How far shots stray from the target (Inaccuracy).
Implementations§
Source§impl AreMiniGameTargeting
impl AreMiniGameTargeting
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 AreMiniGameTargeting
impl Clone for AreMiniGameTargeting
Source§fn clone(&self) -> AreMiniGameTargeting
fn clone(&self) -> AreMiniGameTargeting
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 AreMiniGameTargeting
impl Debug for AreMiniGameTargeting
Source§impl Default for AreMiniGameTargeting
impl Default for AreMiniGameTargeting
Source§impl HasSchema for AreMiniGameTargeting
impl HasSchema for AreMiniGameTargeting
Source§impl PartialEq for AreMiniGameTargeting
impl PartialEq for AreMiniGameTargeting
Source§fn eq(&self, other: &AreMiniGameTargeting) -> bool
fn eq(&self, other: &AreMiniGameTargeting) -> bool
self and other values to be equal, and is used by ==.