TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ DoCommonDashHandle()

void Terraria.Player.DoCommonDashHandle ( out int dir,
out bool dashing,
DashStartAction dashStartAction = null )
inlineprivate

Definition at line 19701 of file Player.cs.

19702 {
19703 dir = 0;
19704 dashing = false;
19705 if (dashTime > 0)
19706 {
19707 dashTime--;
19708 }
19709 if (dashTime < 0)
19710 {
19711 dashTime++;
19712 }
19714 {
19715 if (dashTime > 0)
19716 {
19717 dir = 1;
19718 dashing = true;
19719 dashTime = 0;
19721 dashStartAction?.Invoke(dir);
19722 }
19723 else
19724 {
19725 dashTime = 15;
19726 }
19727 }
19728 else if (controlLeft && releaseLeft)
19729 {
19730 if (dashTime < 0)
19731 {
19732 dir = -1;
19733 dashing = true;
19734 dashTime = 0;
19736 dashStartAction?.Invoke(dir);
19737 }
19738 else
19739 {
19740 dashTime = -15;
19741 }
19742 }
19743 }
bool controlRight
Definition Player.cs:1896
int dashTime
The amount of time this player has left, in ticks, to input the second keystroke of a standard dash i...
Definition Player.cs:1240
bool releaseRight
Definition Player.cs:1942
int timeSinceLastDashStarted
The amount of time that has passed, in ticks, since this player last performed a dash.
Definition Player.cs:1245

References Terraria.Player.controlLeft, Terraria.Player.controlRight, Terraria.Player.dashTime, Terraria.Player.releaseLeft, Terraria.Player.releaseRight, and Terraria.Player.timeSinceLastDashStarted.

Referenced by Terraria.Player.DashMovement().

+ Here is the caller graph for this function: