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,10 +27,9 @@ using OpenRA.Mods.RA;
namespace OpenRA.Mods.Aftermath
{
class ChronoshiftDeployInfo : ITraitInfo
class ChronoshiftDeployInfo : TraitInfo<ChronoshiftDeploy>
{
public readonly int ChargeTime = 120; // Seconds
public object Create(Actor self) { return new ChronoshiftDeploy(self); }
}
class ChronoshiftDeploy : IIssueOrder, IResolveOrder, ITick, IPips
@@ -39,8 +38,6 @@ namespace OpenRA.Mods.Aftermath
[Sync]
int chargeTick = 0; // How long until we can chronoshift again?
public ChronoshiftDeploy(Actor self) { }
public void Tick(Actor self)
{
if (chargeTick > 0)

View File

@@ -23,15 +23,10 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Aftermath
{
class DemoTruckInfo : ITraitInfo
{
public object Create(Actor self) { return new DemoTruck(self); }
}
class DemoTruckInfo : TraitInfo<DemoTruck> { }
class DemoTruck : Chronoshiftable, INotifyDamage
{
public DemoTruck(Actor self) : base(self) { }
// Explode on chronoshift
public override bool Activate(Actor self, int2 targetLocation, int duration, bool killCargo, Actor chronosphere)
{