ActorInitializer, in preparation for next change (bob)
This commit is contained in:
@@ -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>();
|
||||
|
||||
Reference in New Issue
Block a user