@@ -57,25 +57,25 @@ pub fn handle_movement_input_system(
5757 if input_actions. is_active ( Action :: Up , player. id ) {
5858 new_direction = Some ( Direction :: North ) ;
5959 new_velocity. y = 1.0 ;
60- new_state = CharacterState :: Walking ;
60+ new_state = CharacterState :: Running ;
6161 }
6262 if input_actions. is_active ( Action :: Down , player. id ) {
6363 new_direction = Some ( Direction :: South ) ;
6464 new_velocity. y = -1.0 ;
65- new_state = CharacterState :: Walking ;
65+ new_state = CharacterState :: Running ;
6666 }
6767
6868 // Favor facing left or right when two directions are pressed simultaneously
6969 // by checking left/right after up/down.
7070 if input_actions. is_active ( Action :: Left , player. id ) {
7171 new_direction = Some ( Direction :: West ) ;
7272 new_velocity. x = -1.0 ;
73- new_state = CharacterState :: Walking ;
73+ new_state = CharacterState :: Running ;
7474 }
7575 if input_actions. is_active ( Action :: Right , player. id ) {
7676 new_direction = Some ( Direction :: East ) ;
7777 new_velocity. x = 1.0 ;
78- new_state = CharacterState :: Walking ;
78+ new_state = CharacterState :: Running ;
7979 }
8080
8181 // If the user is pressing two directions at once, go diagonally with
@@ -84,14 +84,14 @@ pub fn handle_movement_input_system(
8484 new_velocity = new_velocity. normalize ( ) ;
8585 }
8686
87- if input_actions. is_active ( Action :: Run , player. id ) {
88- character. movement_speed = RUN_SPEED ;
87+ if input_actions. is_active ( Action :: Walk , player. id ) {
88+ character. movement_speed = WALK_SPEED ;
8989 new_state = match new_state {
90- CharacterState :: Walking => CharacterState :: Running ,
91- CharacterState :: Idle | CharacterState :: Running => new_state,
90+ CharacterState :: Running => CharacterState :: Walking ,
91+ CharacterState :: Idle | CharacterState :: Walking => new_state,
9292 }
9393 } else {
94- character. movement_speed = WALK_SPEED ;
94+ character. movement_speed = RUN_SPEED ;
9595 }
9696
9797 if let Some ( direction) = new_direction {
0 commit comments