eliminate old form of GetTurretPosition
This commit is contained in:
@@ -25,7 +25,7 @@ namespace OpenRA.Mods.RA.Render
|
||||
{
|
||||
public Animation rotorAnim, secondRotorAnim;
|
||||
|
||||
public RenderUnitRotor( Actor self )
|
||||
public RenderUnitRotor(Actor self)
|
||||
: base(self)
|
||||
{
|
||||
var unit = self.traits.Get<Unit>();
|
||||
@@ -33,18 +33,18 @@ namespace OpenRA.Mods.RA.Render
|
||||
|
||||
rotorAnim = new Animation(GetImage(self));
|
||||
rotorAnim.PlayRepeating("rotor");
|
||||
anims.Add( "rotor_1", new AnimationWithOffset(
|
||||
anims.Add("rotor_1", new AnimationWithOffset(
|
||||
rotorAnim,
|
||||
() => Combat.GetTurretPosition( self, unit, info.PrimaryOffset, 0 ),
|
||||
null ) { ZOffset = 1 } );
|
||||
() => Combat.GetTurretPosition(self, unit, new Turret(info.PrimaryOffset)),
|
||||
null) { ZOffset = 1 });
|
||||
|
||||
if (info.SecondaryOffset == null) return;
|
||||
|
||||
secondRotorAnim = new Animation(GetImage(self));
|
||||
secondRotorAnim.PlayRepeating( "rotor2" );
|
||||
anims.Add( "rotor_2", new AnimationWithOffset(
|
||||
secondRotorAnim.PlayRepeating("rotor2");
|
||||
anims.Add("rotor_2", new AnimationWithOffset(
|
||||
secondRotorAnim,
|
||||
() => Combat.GetTurretPosition(self, unit, info.SecondaryOffset, 0),
|
||||
() => Combat.GetTurretPosition(self, unit, new Turret(info.SecondaryOffset)),
|
||||
null) { ZOffset = 1 });
|
||||
}
|
||||
|
||||
|
||||
@@ -21,18 +21,18 @@ namespace OpenRA.Mods.RA.Render
|
||||
|
||||
class RenderUnitSpinner : RenderUnit
|
||||
{
|
||||
public RenderUnitSpinner( Actor self )
|
||||
public RenderUnitSpinner(Actor self)
|
||||
: base(self)
|
||||
{
|
||||
var unit = self.traits.Get<Unit>();
|
||||
var info = self.Info.Traits.Get<RenderUnitSpinnerInfo>();
|
||||
|
||||
var spinnerAnim = new Animation( GetImage(self) );
|
||||
spinnerAnim.PlayRepeating( "spinner" );
|
||||
anims.Add( "spinner", new AnimationWithOffset(
|
||||
var spinnerAnim = new Animation(GetImage(self));
|
||||
spinnerAnim.PlayRepeating("spinner");
|
||||
anims.Add("spinner", new AnimationWithOffset(
|
||||
spinnerAnim,
|
||||
() => Combat.GetTurretPosition( self, unit, info.Offset, 0 ),
|
||||
null ) { ZOffset = 1 } );
|
||||
() => Combat.GetTurretPosition(self, unit, new Turret(info.Offset)),
|
||||
null) { ZOffset = 1 });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user