gd: mapped dash actions on guide inputs

This commit is contained in:
2025-06-05 12:19:24 +02:00
parent 178553956d
commit b517404dc4
6 changed files with 54 additions and 32 deletions

View File

@ -14,15 +14,19 @@ public partial class DashSystem: Node3D
private Node3D _head;
private ShapeCast3D _dashCast3D;
private Camera3D _camera;
private MeshInstance3D _dashTarget;
private TweenQueueSystem _tweenQueueSystem;
private MantleSystem _mantleSystem;
private MeshInstance3D _dashTarget;
private DashResolve _dashResolve;
public void Init(Node3D head, Camera3D camera)
public void Init(Node3D head, Camera3D camera, TweenQueueSystem tweenQueueSystem)
{
_dashCast3D = GetNode<ShapeCast3D>("DashCast3D");
_head = head;
_camera = camera;
_tweenQueueSystem = tweenQueueSystem;
_mantleSystem = GetNode<MantleSystem>("MantleSystem");
_mantleSystem.Init(this);
@ -69,11 +73,22 @@ public partial class DashSystem: Node3D
_dashTarget.SetVisible(true);
_dashTarget.SetGlobalPosition(location);
return new DashResolve(shouldMantle, location, mantleLocation);
_dashResolve = new DashResolve(shouldMantle, location, mantleLocation);
return _dashResolve;
}
public void CancelDash()
{
_dashTarget.SetVisible(false);
}
public void Dash()
{
_dashTarget.SetVisible(false);
_tweenQueueSystem.QueueTween(_dashResolve.DashLocation, 0.1f);
if (_dashResolve.EndWithMantle)
{
_tweenQueueSystem.QueueTween(_dashResolve.MantleLocation, 0.1f);
}
}
}