ActorInitializer, in preparation for next change (bob)

This commit is contained in:
Chris Forbes
2010-06-19 14:28:30 +12:00
parent 572cdc9dbf
commit db465e1fdd
106 changed files with 174 additions and 227 deletions

View File

@@ -27,21 +27,17 @@ using OpenRA.Mods.RA.Activities;
namespace OpenRA.Mods.RA
{
public class PlaneInfo : ITraitInfo
public class PlaneInfo : TraitInfo<Plane>
{
public readonly int CruiseAltitude = 20;
public readonly string[] RearmBuildings = { "afld" };
public readonly string[] RepairBuildings = { "fix" };
public object Create(Actor self) { return new Plane(self); }
}
public class Plane : IIssueOrder, IResolveOrder, IMovement
{
public IDisposable reservation;
public Plane(Actor self) {}
static bool PlaneCanEnter(Actor self, Actor a)
{
var plane = self.Info.Traits.Get<PlaneInfo>();