the rest of yesterday's render changes.
This commit is contained in:
@@ -9,24 +9,15 @@ namespace OpenRa.Game.Traits
|
||||
|
||||
public RenderUnitSpinner( Actor self )
|
||||
: base(self)
|
||||
{
|
||||
spinnerAnim = new Animation( self.Info.Name );
|
||||
spinnerAnim.PlayRepeating( "spinner" );
|
||||
}
|
||||
|
||||
public override IEnumerable<Tuple<Sprite, float2, int>> Render(Actor self)
|
||||
{
|
||||
var unit = self.traits.Get<Unit>();
|
||||
|
||||
yield return Util.Centered(self, anim.Image, self.CenterLocation);
|
||||
yield return Util.Centered( self, spinnerAnim.Image, self.CenterLocation
|
||||
+ Util.GetTurretPosition(self, unit, self.Info.PrimaryOffset, 0));
|
||||
}
|
||||
|
||||
public override void Tick(Actor self)
|
||||
{
|
||||
base.Tick(self);
|
||||
spinnerAnim.Tick();
|
||||
spinnerAnim = new Animation( self.Info.Name );
|
||||
spinnerAnim.PlayRepeating( "spinner" );
|
||||
anims.Add( "spinner", new AnimationWithOffset(
|
||||
spinnerAnim,
|
||||
() => Util.GetTurretPosition( self, unit, self.Info.PrimaryOffset, 0 ),
|
||||
null ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user