pub struct TargetAllow { /* private fields */ }Expand description
A struct to specifies how a bullet object should interact with other game objects or units based on their relationship.
Implementations§
Source§impl TargetAllow
impl TargetAllow
Sourcepub fn set_terrain_allowed(&mut self, val: bool)
pub fn set_terrain_allowed(&mut self, val: bool)
Sets whether the bullet object can collide with terrain.
Sourcepub fn is_terrain_allowed(&self) -> bool
pub fn is_terrain_allowed(&self) -> bool
Gets whether the bullet object can collide with terrain.
Sourcepub fn allow(&mut self, relation: Relation, allow: bool)
pub fn allow(&mut self, relation: Relation, allow: bool)
Allows or disallows the bullet object to interact with a game object or unit, based on their relationship.
§Arguments
relation- The relationship between the bullet object and the other game object or unit.allow- Whether the bullet object should be allowed to interact.
Sourcepub fn to_value(&mut self) -> i32
pub fn to_value(&mut self) -> i32
Converts the object to a value that can be used for interaction settings.
§Returns
usize- The value that can be used for interaction settings.
Sourcepub fn new() -> TargetAllow
pub fn new() -> TargetAllow
Creates a new TargetAllow object with default settings.
Sourcepub fn with_value(value: i32) -> TargetAllow
pub fn with_value(value: i32) -> TargetAllow
Creates a new TargetAllow object with the specified value.
§Arguments
value- The value to use for the new TargetAllow object.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TargetAllow
impl RefUnwindSafe for TargetAllow
impl Send for TargetAllow
impl Sync for TargetAllow
impl Unpin for TargetAllow
impl UnwindSafe for TargetAllow
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