-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Sonic Frontiers] Recovery Jump into Flight
- Loading branch information
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
Source/Sonic Frontiers/Gameplay/Skills/Tails/Recovery Jump into Flight.hmm
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,22 @@ | ||
Code "Recovery Jump into Flight" in "Gameplay/Skills/Tails" by "Hyper" does "Allows Tails to instantly start flying after jumping when flinging off terrain whilst holding the jump button." | ||
// | ||
#lib "Player" | ||
#lib "Time" | ||
|
||
static float _recoveryJumpTimer = 0.0f; | ||
// | ||
{ | ||
if (Player.GetPlayerType() != Player.PlayerType.Tails) | ||
return; | ||
|
||
if (Player.State.GetCurrentStateID<Tails.StateID>() == Tails.StateID.StateRecoveryJump) | ||
{ | ||
if (_recoveryJumpTimer > 0.65f && Player.Input.IsDown(Player.InputActionType.PlayerJump)) | ||
{ | ||
Player.State.SetState<Tails.StateID>(Tails.StateID.StateTailsFly); | ||
_recoveryJumpTimer = 0.0f; | ||
} | ||
|
||
_recoveryJumpTimer += Time.GetDeltaTime(); | ||
} | ||
} |