Stop using manual hashing for dash state (#31)
CI / build-and-test (push) Successful in 11m2s
CI / build-and-test (push) Successful in 11m2s
Reviewed-on: #31 Co-authored-by: Álex Román Núñez <eirexe@eirteam.moe>
This commit was merged in pull request #31.
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
use std::hash::Hasher;
|
||||
|
||||
use super::{
|
||||
CollisionContext, EnterContext, FighterStateImpl, InterruptContext, UpdateContext, ground, run,
|
||||
wait, walk,
|
||||
@@ -11,18 +9,12 @@ use crate::fighter::state::fall::FallState;
|
||||
use crate::fighter::state::ground::{GroundedMotionResult, GroundedStateCommon};
|
||||
use crate::input::FighterCommands::{SmashMoveLeft, SmashMoveRight};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
#[derive(Debug, Clone, Hash)]
|
||||
pub struct DashState {
|
||||
direction: FighterFacingDirection,
|
||||
pub ground_common: GroundedStateCommon,
|
||||
}
|
||||
|
||||
impl std::hash::Hash for DashState {
|
||||
fn hash<H: Hasher>(&self, state: &mut H) {
|
||||
self.direction.hash(state);
|
||||
}
|
||||
}
|
||||
|
||||
impl DashState {
|
||||
pub fn new(direction: FighterFacingDirection, ground_common: GroundedStateCommon) -> Self {
|
||||
Self {
|
||||
|
||||
Reference in New Issue
Block a user