Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5e7529a3ac |
@@ -1,3 +1,5 @@
|
|||||||
|
use std::hash::Hasher;
|
||||||
|
|
||||||
use super::{
|
use super::{
|
||||||
CollisionContext, EnterContext, FighterStateImpl, InterruptContext, UpdateContext, ground, run,
|
CollisionContext, EnterContext, FighterStateImpl, InterruptContext, UpdateContext, ground, run,
|
||||||
wait, walk,
|
wait, walk,
|
||||||
@@ -9,12 +11,18 @@ use crate::fighter::state::fall::FallState;
|
|||||||
use crate::fighter::state::ground::{GroundedMotionResult, GroundedStateCommon};
|
use crate::fighter::state::ground::{GroundedMotionResult, GroundedStateCommon};
|
||||||
use crate::input::FighterCommands::{SmashMoveLeft, SmashMoveRight};
|
use crate::input::FighterCommands::{SmashMoveLeft, SmashMoveRight};
|
||||||
|
|
||||||
#[derive(Debug, Clone, Hash)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct DashState {
|
pub struct DashState {
|
||||||
direction: FighterFacingDirection,
|
direction: FighterFacingDirection,
|
||||||
pub ground_common: GroundedStateCommon,
|
pub ground_common: GroundedStateCommon,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl std::hash::Hash for DashState {
|
||||||
|
fn hash<H: Hasher>(&self, state: &mut H) {
|
||||||
|
self.direction.hash(state);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl DashState {
|
impl DashState {
|
||||||
pub fn new(direction: FighterFacingDirection, ground_common: GroundedStateCommon) -> Self {
|
pub fn new(direction: FighterFacingDirection, ground_common: GroundedStateCommon) -> Self {
|
||||||
Self {
|
Self {
|
||||||
|
|||||||
Reference in New Issue
Block a user