Player.DesiredTarget property
parent
c964415be2
commit
f60b2d548d
|
@ -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()
|
||||||
|
|
Loading…
Reference in New Issue