pub enum TargetingMode {
Self_,
SingleTarget,
MultiTarget {
max_targets: u32,
radius: f32,
},
AoECircle {
radius: f32,
},
AoESphere {
radius: f32,
},
Cone {
half_angle_deg: f32,
distance: f32,
},
Rectangle {
width: f32,
length: f32,
},
Chain {
max_bounces: u32,
bounce_radius: f32,
falloff_per_bounce: f32,
},
SmartCast {
priority: TargetPriority,
},
GroundTarget {
indicator: AreaIndicator,
},
}Variants§
Self_
SingleTarget
MultiTarget
AoECircle
AoESphere
Cone
Rectangle
Chain
SmartCast
Fields
§
priority: TargetPriorityGroundTarget
Fields
§
indicator: AreaIndicatorImplementations§
Source§impl TargetingMode
impl TargetingMode
pub fn display_name(&self) -> String
Sourcepub fn contains_point_2d(
&self,
origin: Vec2,
forward: Vec2,
target: Vec2,
) -> bool
pub fn contains_point_2d( &self, origin: Vec2, forward: Vec2, target: Vec2, ) -> bool
Returns true if a given world-space point is within this targeting shape,
assuming caster is at origin, facing in forward direction.
Trait Implementations§
Source§impl Clone for TargetingMode
impl Clone for TargetingMode
Source§impl Debug for TargetingMode
impl Debug for TargetingMode
Source§impl PartialEq for TargetingMode
impl PartialEq for TargetingMode
impl StructuralPartialEq for TargetingMode
Auto Trait Implementations§
impl Freeze for TargetingMode
impl RefUnwindSafe for TargetingMode
impl Send for TargetingMode
impl Sync for TargetingMode
impl Unpin for TargetingMode
impl UnsafeUnpin for TargetingMode
impl UnwindSafe for TargetingMode
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.