use TickRender() for RenderSprites and PaletteModifier

This commit is contained in:
Matthias Mailänder
2014-07-03 20:42:37 +02:00
parent 58cb603803
commit 87fd576b26
23 changed files with 48 additions and 43 deletions

View File

@@ -9,6 +9,7 @@
#endregion
using System.Linq;
using OpenRA.Graphics;
using OpenRA.Traits;
namespace OpenRA.Mods.RA.Render
@@ -34,13 +35,13 @@ namespace OpenRA.Mods.RA.Render
.Single(a => a.Info.Name == info.Armament);
}
public override void Tick(Actor self)
public override void TickRender(WorldRenderer wr, Actor self)
{
var sequence = (armament.IsReloading ? "empty-" : "") + (attack.IsAttacking ? "aim" : "idle");
if (sequence != DefaultAnimation.CurrentSequence.Name)
DefaultAnimation.ReplaceAnim(sequence);
base.Tick(self);
base.TickRender(wr, self);
}
}
}