mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Target the specific attack types, to handle TripeStrike etc...
Removed the Axe sfx until the animations show the swing
This commit is contained in:
@ -10,6 +10,30 @@ use specs::{Component, FlaggedStorage};
|
||||
use specs_idvs::IDVStorage;
|
||||
use std::time::Duration;
|
||||
|
||||
#[derive(Copy, Clone, Hash, Eq, PartialEq, Debug, Serialize, Deserialize)]
|
||||
pub enum CharacterAbilityType {
|
||||
BasicMelee,
|
||||
BasicRanged,
|
||||
Boost,
|
||||
DashMelee,
|
||||
BasicBlock,
|
||||
TripleStrike,
|
||||
}
|
||||
|
||||
impl From<&CharacterState> for CharacterAbilityType {
|
||||
fn from(state: &CharacterState) -> Self {
|
||||
match state {
|
||||
CharacterState::BasicMelee(_) => Self::BasicMelee,
|
||||
CharacterState::BasicRanged(_) => Self::BasicRanged,
|
||||
CharacterState::Boost(_) => Self::Boost,
|
||||
CharacterState::DashMelee(_) => Self::DashMelee,
|
||||
CharacterState::BasicBlock => Self::BasicBlock,
|
||||
CharacterState::TripleStrike(_) => Self::TripleStrike,
|
||||
_ => Self::BasicMelee,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, PartialEq, Debug, Serialize, Deserialize)]
|
||||
pub enum CharacterAbility {
|
||||
BasicMelee {
|
||||
|
Reference in New Issue
Block a user