Player.DesiredTarget property

pull/6/head
John Montagu, the 4th Earl of Sandvich 2023-09-06 22:53:39 -07:00
parent c964415be2
commit f60b2d548d
Signed by: sandvich
GPG Key ID: 9A39BE37E602B22D
1 changed files with 3 additions and 3 deletions

View File

@ -11,6 +11,8 @@ public sealed partial class Player : Character
{
private string _spriteAnim;
public Vector2 DesiredTarget { get; set; }
[Export]
public PlayerCamera Camera { get; set; }
@ -107,9 +109,7 @@ public sealed partial class Player : Character
protected override void DrawTarget()
{
base.DrawTarget();
DirectionMarker.GlobalRotation = DirectionMarker.GlobalPosition
.DirectionTo(GetGlobalMousePosition())
.Angle();
DirectionMarker.GlobalRotation = DesiredTarget.Angle();
}
public override void Footstep()