This commit is contained in:
Chris Forbes
2011-07-19 18:56:12 +12:00
parent 7429c8ef89
commit 833533b4c3
3 changed files with 11 additions and 10 deletions

View File

@@ -21,15 +21,8 @@ namespace OpenRA.Mods.RA.Render
public class RenderUnit : RenderSimple
{
static Func<int> MakeFacingFunc(Actor self)
{
var facing = self.TraitOrDefault<IFacing>();
if (facing == null) return () => 0;
return () => facing.Facing;
}
public RenderUnit(Actor self)
: base(self, MakeFacingFunc(self))
: base(self, RenderSimple.MakeFacingFunc(self))
{
anim.PlayRepeating("idle");
}