gd: state chart supports dashing. new greybox material
This commit is contained in:
@ -110,6 +110,7 @@ public partial class PlayerController : CharacterBody3D
|
||||
|
||||
DashSystem = GetNode<DashSystem>("DashSystem");
|
||||
DashSystem.Init(HeadSystem, camera, TweenQueueSystem);
|
||||
DashSystem.DashEnded += OnDashEnded;
|
||||
|
||||
HealthSystem = GetNode<HealthSystem>("HealthSystem");
|
||||
|
||||
@ -143,7 +144,7 @@ public partial class PlayerController : CharacterBody3D
|
||||
|
||||
public void OnInputAimPressed()
|
||||
{
|
||||
PlayerState.SendEvent("aim_started");
|
||||
PlayerState.SendEvent("aim_pressed");
|
||||
|
||||
if (_dashCanceled)
|
||||
return;
|
||||
@ -152,19 +153,21 @@ public partial class PlayerController : CharacterBody3D
|
||||
}
|
||||
public void OnInputAimReleased()
|
||||
{
|
||||
PlayerState.SendEvent("aim_released");
|
||||
if (!_dashCanceled)
|
||||
DashSystem.Dash();
|
||||
_dashCanceled = false;
|
||||
}
|
||||
public void OnInputAimCanceled()
|
||||
{
|
||||
PlayerState.SendEvent("aim_canceled");
|
||||
_dashCanceled = true;
|
||||
DashSystem.CancelDash();
|
||||
}
|
||||
|
||||
public void OnInputHitPressed()
|
||||
{
|
||||
GD.Print("OnInputHitPressed");
|
||||
PlayerState.SendEvent("hit_pressed");
|
||||
}
|
||||
|
||||
public void OnInputJumpPressed()
|
||||
@ -176,6 +179,11 @@ public partial class PlayerController : CharacterBody3D
|
||||
MoveSystem.Jump(IsOnFloor());
|
||||
}
|
||||
|
||||
public void OnDashEnded()
|
||||
{
|
||||
PlayerState.SendEvent("dash_ended");
|
||||
}
|
||||
|
||||
public override void _PhysicsProcess(double delta)
|
||||
{
|
||||
TweenQueueSystem.ProcessTweens();
|
||||
|
Reference in New Issue
Block a user