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