Beginnings of building power tracking
This commit is contained in:
@@ -2,10 +2,11 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using OpenRa.Game.GameRules;
|
||||
|
||||
namespace OpenRa.Game.Traits
|
||||
{
|
||||
class Building : ITick
|
||||
class Building : ITick, INotifyBuildComplete
|
||||
{
|
||||
public Building(Actor self)
|
||||
{
|
||||
@@ -19,5 +20,13 @@ namespace OpenRa.Game.Traits
|
||||
|
||||
first = false;
|
||||
}
|
||||
|
||||
public void BuildingComplete(Actor self)
|
||||
{
|
||||
UnitInfo.BuildingInfo bi = self.unitInfo as UnitInfo.BuildingInfo;
|
||||
if (bi == null) return;
|
||||
|
||||
self.Owner.Power += bi.Power;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user