Facing -> new trait ("Unit")

This commit is contained in:
Bob
2009-11-25 18:11:44 +13:00
parent 7ccb2aa9ee
commit 2aea110497
21 changed files with 120 additions and 87 deletions

View File

@@ -23,6 +23,8 @@ namespace OpenRa.Game.Traits.Activities
public IActivity Tick( Actor self, Mobile mobile )
{
var unit = self.traits.Get<Unit>();
if( isDone )
{
self.traits.Get<Harvester>().Deliver( self, refinery );
@@ -61,7 +63,7 @@ namespace OpenRa.Game.Traits.Activities
// no refineries reachable?
return null;
}
else if( mobile.facing != 64 )
else if( unit.Facing != 64 )
return new Turn( 64 ) { NextActivity = this };
var renderUnit = self.traits.WithInterface<RenderUnit>().First();