StyleCop and avoid redundancy
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
namespace OpenRA.Mods.RA.Render
|
namespace OpenRA.Mods.RA.Render
|
||||||
{
|
{
|
||||||
|
[Desc("Used for tesla coil and obelisk.")]
|
||||||
public class RenderBuildingChargeInfo : RenderBuildingInfo
|
public class RenderBuildingChargeInfo : RenderBuildingInfo
|
||||||
{
|
{
|
||||||
[Desc("Sound to play when building charges.")]
|
[Desc("Sound to play when building charges.")]
|
||||||
@@ -19,7 +20,6 @@ namespace OpenRA.Mods.RA.Render
|
|||||||
public override object Create(ActorInitializer init) { return new RenderBuildingCharge(init, this); }
|
public override object Create(ActorInitializer init) { return new RenderBuildingCharge(init, this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
/* used for tesla and obelisk */
|
|
||||||
public class RenderBuildingCharge : RenderBuilding
|
public class RenderBuildingCharge : RenderBuilding
|
||||||
{
|
{
|
||||||
RenderBuildingChargeInfo info;
|
RenderBuildingChargeInfo info;
|
||||||
@@ -33,8 +33,7 @@ namespace OpenRA.Mods.RA.Render
|
|||||||
public void PlayCharge(Actor self)
|
public void PlayCharge(Actor self)
|
||||||
{
|
{
|
||||||
Sound.Play(info.ChargeAudio, self.CenterPosition);
|
Sound.Play(info.ChargeAudio, self.CenterPosition);
|
||||||
DefaultAnimation.PlayThen(NormalizeSequence(self, info.ChargeSequence),
|
PlayCustomAnim(self, info.ChargeSequence);
|
||||||
() => DefaultAnimation.PlayRepeating(NormalizeSequence(self, "idle")));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user