pub enum CharacterState {
Show 42 variants
Idle(Data),
Climb(Data),
Sit,
Dance,
Talk,
Pet(Data),
Glide(Data),
GlideWield(Data),
Stunned(Data),
BasicBlock(Data),
Equipping(Data),
Wielding(Data),
Roll(Data),
BasicMelee(Data),
BasicRanged(Data),
Boost(Data),
DashMelee(Data),
ComboMelee2(Data),
LeapMelee(Data),
LeapShockwave(Data),
ChargedRanged(Data),
ChargedMelee(Data),
RepeaterRanged(Data),
Shockwave(Data),
BasicBeam(Data),
BasicAura(Data),
StaticAura(Data),
Blink(Data),
BasicSummon(Data),
SelfBuff(Data),
SpriteSummon(Data),
UseItem(Data),
SpriteInteract(Data),
Wallrun(Data),
Skate(Data),
Music(Data),
FinisherMelee(Data),
DiveMelee(Data),
RiposteMelee(Data),
RapidMelee(Data),
Transform(Data),
RegrowHead(Data),
}
Variants§
Idle(Data)
Climb(Data)
Sit
Dance
Talk
Pet(Data)
Glide(Data)
GlideWield(Data)
Stunned(Data)
A stunned state
BasicBlock(Data)
A basic blocking state
Equipping(Data)
Player is busy equipping or unequipping weapons
Wielding(Data)
Player is holding a weapon and can perform other actions
Roll(Data)
A dodge where player can roll
BasicMelee(Data)
A basic melee attack (e.g. sword)
BasicRanged(Data)
A basic ranged attack (e.g. bow)
Boost(Data)
A force will boost you into a direction for some duration
DashMelee(Data)
Dash forward and then attack
ComboMelee2(Data)
A state where you progress through multiple melee attacks
LeapMelee(Data)
A leap followed by a small aoe ground attack
LeapShockwave(Data)
A leap followed by a shockwave
ChargedRanged(Data)
A charged ranged attack (e.g. bow)
ChargedMelee(Data)
A charged melee attack
RepeaterRanged(Data)
A repeating ranged attack
Shockwave(Data)
A ground shockwave attack
BasicBeam(Data)
A continuous attack that affects all creatures in a cone originating from the source
BasicAura(Data)
Creates an aura that persists as long as you are actively casting
StaticAura(Data)
Creates an aura that is attached to a pseudo entity, so it doesn’t move with you Optionally allows for sprites to be created as well
Blink(Data)
A short teleport that targets either a position or entity
BasicSummon(Data)
Summons creatures that fight for the caster
SelfBuff(Data)
Inserts a buff on the caster
SpriteSummon(Data)
Creates sprites around the caster
UseItem(Data)
Handles logic for using an item so it is not simply instant
SpriteInteract(Data)
Handles logic for interacting with a sprite, e.g. using a chest or picking a plant
Wallrun(Data)
Runs on the wall
Skate(Data)
Ice skating or skiing
Music(Data)
Play music instrument
FinisherMelee(Data)
Melee attack that scales off and consumes combo
DiveMelee(Data)
State entered when diving, melee attack triggered upon landing on the ground
RiposteMelee(Data)
Attack that attempts to parry, and if it parries moves to an attack
RapidMelee(Data)
A series of consecutive, identical attacks that only go through buildup and recover once for the entire state
Transform(Data)
Transforms an entity into another
RegrowHead(Data)
Regrow a missing head
Implementations§
source§impl CharacterState
impl CharacterState
pub fn is_wield(&self) -> bool
pub fn was_wielded(&self) -> bool
pub fn is_glide_wielded(&self) -> bool
pub fn is_stealthy(&self) -> bool
pub fn should_follow_look(&self) -> bool
pub fn is_attack(&self) -> bool
pub fn is_aimed(&self) -> bool
pub fn is_using_hands(&self) -> bool
pub fn is_parry(&self, attack_source: AttackSource) -> bool
pub fn is_block(&self, attack_source: AttackSource) -> bool
sourcepub fn block_angle(&self) -> f32
pub fn block_angle(&self) -> f32
In radians
pub fn is_dodge(&self) -> bool
pub fn is_glide(&self) -> bool
pub fn is_skate(&self) -> bool
pub fn is_music(&self) -> bool
pub fn roll_attack_immunities(&self) -> Option<AttackFilters>
pub fn is_stunned(&self) -> bool
pub fn is_forced_movement(&self) -> bool
pub fn is_melee_attack(&self) -> bool
pub fn is_beam_attack(&self) -> bool
pub fn can_perform_mounted(&self) -> bool
pub fn is_sitting(&self) -> bool
sourcepub fn same_variant(&self, other: &Self) -> bool
pub fn same_variant(&self, other: &Self) -> bool
Compares for shallow equality (does not check internal struct equality)
pub fn behavior( &self, j: &JoinData<'_>, output_events: &mut OutputEvents<'_, '_>, ) -> StateUpdate
pub fn handle_event( &self, j: &JoinData<'_>, output_events: &mut OutputEvents<'_, '_>, action: ControlAction, ) -> StateUpdate
pub fn footwear(&self) -> Option<Friction>
pub fn ability_info(&self) -> Option<AbilityInfo>
pub fn stage_section(&self) -> Option<StageSection>
pub fn durations(&self) -> Option<DurationsInfo>
pub fn timer(&self) -> Option<Duration>
pub fn attack_kind(&self) -> Option<AttackSource>
Trait Implementations§
source§impl Clone for CharacterState
impl Clone for CharacterState
source§fn clone(&self) -> CharacterState
fn clone(&self) -> CharacterState
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Component for CharacterState
impl Component for CharacterState
§type Storage = DerefFlaggedStorage<CharacterState, VecStorage<CharacterState>>
type Storage = DerefFlaggedStorage<CharacterState, VecStorage<CharacterState>>
source§impl Debug for CharacterState
impl Debug for CharacterState
source§impl Default for CharacterState
impl Default for CharacterState
source§impl<'de> Deserialize<'de> for CharacterState
impl<'de> Deserialize<'de> for CharacterState
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>,
source§impl Display for CharacterState
impl Display for CharacterState
source§impl From<&CharacterState> for CharacterAbilityType
impl From<&CharacterState> for CharacterAbilityType
source§fn from(state: &CharacterState) -> Self
fn from(state: &CharacterState) -> Self
source§impl From<(&CharacterAbility, AbilityInfo, &JoinData<'_>)> for CharacterState
impl From<(&CharacterAbility, AbilityInfo, &JoinData<'_>)> for CharacterState
source§fn from(
(ability, ability_info, data): (&CharacterAbility, AbilityInfo, &JoinData<'_>),
) -> Self
fn from( (ability, ability_info, data): (&CharacterAbility, AbilityInfo, &JoinData<'_>), ) -> Self
source§impl PartialEq for CharacterState
impl PartialEq for CharacterState
source§fn eq(&self, other: &CharacterState) -> bool
fn eq(&self, other: &CharacterState) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for CharacterState
impl Serialize for CharacterState
impl StructuralPartialEq for CharacterState
Auto Trait Implementations§
impl Freeze for CharacterState
impl RefUnwindSafe for CharacterState
impl Send for CharacterState
impl Sync for CharacterState
impl Unpin for CharacterState
impl UnwindSafe for CharacterState
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<C, M> ConvertSaveload<M> for C
impl<C, M> ConvertSaveload<M> for C
§type Error = Infallible
type Error = Infallible
§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>
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>
Data
) using
entity to marker mapping function§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<Context> SubContext<Context> for Context
impl<Context> SubContext<Context> for Context
fn sub_context(self) -> Context
§impl<T> TryDefault for Twhere
T: Default,
impl<T> TryDefault for Twhere
T: Default,
§fn try_default() -> Result<T, String>
fn try_default() -> Result<T, String>
§fn unwrap_default() -> Self
fn unwrap_default() -> Self
try_default
and panics on an error case.