Move Facing and Altitude onto IMove impls, with associated pile of cleanups
This commit is contained in:
@@ -24,14 +24,14 @@ namespace OpenRA.Mods.RA.Render
|
||||
public RenderUnitSpinner(Actor self)
|
||||
: base(self)
|
||||
{
|
||||
var unit = self.traits.Get<Unit>();
|
||||
var move = self.traits.Get<IMove>();
|
||||
var info = self.Info.Traits.Get<RenderUnitSpinnerInfo>();
|
||||
|
||||
var spinnerAnim = new Animation(GetImage(self));
|
||||
spinnerAnim.PlayRepeating("spinner");
|
||||
anims.Add("spinner", new AnimationWithOffset(
|
||||
spinnerAnim,
|
||||
() => Combat.GetTurretPosition(self, unit, new Turret(info.Offset)),
|
||||
() => Combat.GetTurretPosition(self, move, new Turret(info.Offset)),
|
||||
null) { ZOffset = 1 });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user