gd: state chart supports dashing. new greybox material
This commit is contained in:
@ -21,6 +21,11 @@ public partial class DashSystem: Node3D
|
||||
|
||||
private DashResolve _dashResolve;
|
||||
|
||||
[Signal]
|
||||
public delegate void DashStartedEventHandler();
|
||||
[Signal]
|
||||
public delegate void DashEndedEventHandler();
|
||||
|
||||
public void Init(Node3D head, Camera3D camera, TweenQueueSystem tweenQueueSystem)
|
||||
{
|
||||
_dashCast3D = GetNode<ShapeCast3D>("DashCast3D");
|
||||
@ -82,13 +87,21 @@ public partial class DashSystem: Node3D
|
||||
_dashTarget.SetVisible(false);
|
||||
}
|
||||
|
||||
public void DashTweenEnded()
|
||||
{
|
||||
EmitSignal(SignalName.DashEnded);
|
||||
}
|
||||
|
||||
public void Dash()
|
||||
{
|
||||
EmitSignal(SignalName.DashStarted);
|
||||
_dashTarget.SetVisible(false);
|
||||
_tweenQueueSystem.QueueTween(_dashResolve.DashLocation, 0.1f);
|
||||
var dashTweenInputs = new TweenQueueSystem.TweenInputs(_dashResolve.DashLocation, 0.1f);
|
||||
var dashTween = _tweenQueueSystem.TweenToLocation(dashTweenInputs);
|
||||
dashTween.Finished += DashTweenEnded;
|
||||
if (_dashResolve.EndWithMantle)
|
||||
{
|
||||
_tweenQueueSystem.QueueTween(_dashResolve.MantleLocation, 0.1f);
|
||||
_tweenQueueSystem.QueueTween(_dashResolve.MantleLocation, 0.2f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user