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

@@ -34,6 +34,13 @@ namespace OpenRA.Traits
{
public Dictionary<string, AnimationWithOffset> anims = new Dictionary<string, AnimationWithOffset>();
public static Func<int> MakeFacingFunc(Actor self)
{
var facing = self.TraitOrDefault<IFacing>();
if (facing == null) return () => 0;
return () => facing.Facing;
}
public Animation anim
{
get { return anims[""].Animation; }