pub enum ProjectileConstructor {
Show 19 variants
Arrow {
damage: f32,
knockback: f32,
energy_regen: f32,
},
Knife {
damage: f32,
knockback: f32,
energy_regen: f32,
},
FireDroplet {
damage: f32,
radius: f32,
energy_regen: f32,
min_falloff: f32,
reagent: Option<Reagent>,
},
Fireball {
damage: f32,
radius: f32,
energy_regen: f32,
min_falloff: f32,
},
Frostball {
damage: f32,
radius: f32,
min_falloff: f32,
},
Poisonball {
damage: f32,
radius: f32,
knockback: f32,
min_falloff: f32,
},
NecroticSphere {
damage: f32,
radius: f32,
min_falloff: f32,
},
Magicball {
damage: f32,
radius: f32,
min_falloff: f32,
},
Possess,
ClayRocket {
damage: f32,
radius: f32,
knockback: f32,
min_falloff: f32,
},
InkBomb {
damage: f32,
radius: f32,
min_falloff: f32,
},
Snowball {
damage: f32,
radius: f32,
min_falloff: f32,
},
ExplodingPumpkin {
damage: f32,
radius: f32,
knockback: f32,
min_falloff: f32,
},
DagonBomb {
damage: f32,
radius: f32,
knockback: f32,
min_falloff: f32,
},
IceBomb {
damage: f32,
radius: f32,
knockback: f32,
min_falloff: f32,
},
LaserBeam {
damage: f32,
radius: f32,
knockback: f32,
min_falloff: f32,
},
Trap {
damage: f32,
},
Mine {
damage: f32,
radius: f32,
min_falloff: f32,
},
Pebble {
damage: f32,
knockback: f32,
},
}
Variants§
Arrow
Knife
FireDroplet
Fireball
Frostball
Poisonball
NecroticSphere
Magicball
Possess
ClayRocket
InkBomb
Snowball
ExplodingPumpkin
DagonBomb
IceBomb
LaserBeam
Trap
Mine
Pebble
Implementations§
source§impl ProjectileConstructor
impl ProjectileConstructor
pub fn create_projectile( self, owner: Option<Uid>, precision_mult: f32, tool_stats: Stats, damage_effect: Option<CombatEffect> ) -> Projectile
pub fn modified_projectile(self, power: f32, regen: f32, range: f32) -> Self
pub fn is_explosive(&self) -> bool
Trait Implementations§
source§impl Clone for ProjectileConstructor
impl Clone for ProjectileConstructor
source§fn clone(&self) -> ProjectileConstructor
fn clone(&self) -> ProjectileConstructor
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ProjectileConstructor
impl Debug for ProjectileConstructor
source§impl<'de> Deserialize<'de> for ProjectileConstructor
impl<'de> Deserialize<'de> for ProjectileConstructor
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for ProjectileConstructor
impl PartialEq for ProjectileConstructor
source§fn eq(&self, other: &ProjectileConstructor) -> bool
fn eq(&self, other: &ProjectileConstructor) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for ProjectileConstructor
impl Serialize for ProjectileConstructor
impl Copy for ProjectileConstructor
impl StructuralPartialEq for ProjectileConstructor
Auto Trait Implementations§
impl RefUnwindSafe for ProjectileConstructor
impl Send for ProjectileConstructor
impl Sync for ProjectileConstructor
impl Unpin for ProjectileConstructor
impl UnwindSafe for ProjectileConstructor
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<C, M> ConvertSaveload<M> for C
impl<C, M> ConvertSaveload<M> for C
§type Error = Infallible
type Error = Infallible
Error may occur during serialization or deserialization of component
§fn convert_into<F>(
&self,
_: F
) -> Result<<C as ConvertSaveload<M>>::Data, <C as ConvertSaveload<M>>::Error>
fn convert_into<F>( &self, _: F ) -> Result<<C as ConvertSaveload<M>>::Data, <C as ConvertSaveload<M>>::Error>
Convert this data type into serializable form (
Data
) using
entity to marker mapping function§fn convert_from<F>(
data: <C as ConvertSaveload<M>>::Data,
_: F
) -> Result<C, <C as ConvertSaveload<M>>::Error>
fn convert_from<F>( data: <C as ConvertSaveload<M>>::Data, _: F ) -> Result<C, <C as ConvertSaveload<M>>::Error>
Convert this data from a deserializable form (
Data
) using
entity to marker mapping function