Make RenderUnit.PlayCustomAnimBackwards not crash if the callback is null

This commit is contained in:
ScottNZ
2014-02-10 22:44:35 +13:00
parent 74e72cfc01
commit ea1d1320be

View File

@@ -34,10 +34,10 @@ namespace OpenRA.Mods.RA.Render
() => { PlayCustomAnimRepeating(self, name); });
}
public void PlayCustomAnimBackwards(Actor self, string name, Action a)
public void PlayCustomAnimBackwards(Actor self, string name, Action after)
{
anim.PlayBackwardsThen(name,
() => { anim.PlayRepeating("idle"); a(); });
() => { anim.PlayRepeating("idle"); if (after != null) after(); });
}
}
}