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

@@ -64,8 +64,16 @@ namespace OpenRA.Mods.Cnc.Traits
IEnumerable<int> speedModifiers;
INotifyVisualPositionChanged[] notifyVisualPositionChanged;
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; } }
[Sync]
public WPos CenterPosition { get; private set; }