Add Orientation getter to IFacing.

This commit is contained in:
Paul Chote
2020-06-05 20:17:32 +01:00
committed by tovl
parent c7ba359688
commit 43717a89b5
6 changed files with 39 additions and 11 deletions

View File

@@ -68,8 +68,16 @@ namespace OpenRA.Mods.Common.Traits
[Sync]
public WPos CenterPosition { get; private set; }
WRot orientation;
[Sync]
public WAngle Facing { get; set; }
public WAngle Facing
{
get { return orientation.Yaw; }
set { orientation = orientation.WithYaw(value); }
}
public WRot Orientation { get { return orientation; } }
public WAngle TurnSpeed { get { return WAngle.Zero; } }