-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
transitions between any air state and wall run fixed to not stay on i…
…nfinite loop between states
- Loading branch information
1 parent
8d0b450
commit 6dfebce
Showing
11 changed files
with
92 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
...onents/motion/3D/first-person/controller/states/transitions/any_to_wall_run_transition.gd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
class_name AnyToWallRunTransition extends MachineTransition | ||
|
||
|
||
func should_transition() -> bool: | ||
if from_state is AirState: | ||
return from_state.wall_run_start_cooldown_timer.is_stopped() | ||
|
||
return false |
13 changes: 0 additions & 13 deletions
13
...nents/motion/3D/first-person/controller/states/transitions/fall_to_wall_run_transition.gd
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
...nents/motion/3D/first-person/controller/states/transitions/jump_to_wall_run_transition.gd
This file was deleted.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
...nents/motion/3D/first-person/controller/states/transitions/wall_run_to_fall_transition.gd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
class_name WallRunToFallTransition extends MachineTransition | ||
|
||
|
||
|
||
func on_transition() -> void: | ||
if from_state is WallRun and to_state is Fall: | ||
if from_state.wall_run_cooldown > 0 and is_instance_valid(from_state.wall_run_cooldown_timer): | ||
from_state.wall_run_cooldown_timer.start(from_state.wall_run_cooldown) | ||
|
8 changes: 8 additions & 0 deletions
8
.../motion/3D/first-person/controller/states/transitions/wall_run_to_wall_jump_transition.gd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
class_name WallRunToWallJumpTransition extends MachineTransition | ||
|
||
|
||
func on_transition() -> void: | ||
if from_state is WallRun and to_state is WallJump: | ||
if from_state.wall_run_cooldown > 0 and is_instance_valid(from_state.wall_run_cooldown_timer): | ||
from_state.wall_run_cooldown_timer.start(from_state.wall_run_cooldown) | ||
|