Files
OpenRA/OpenRA.Mods.RA/UnitStances/UnitStanceNone.cs
geckosoft 6b40abb58c Implemented: Stances
Added: Basic stances (Aggressive, Guard (Hold Ground), Hold Fire, None (dummy), Return Fire)
Added: WorldCommandWidget (to be able to set said stances)
Added: WorldCommandWidget to ra (cnc will follow, later on)
Changed: Added support to AttackBase for firing with movement disabled + utility method ScanForTarget (used by stances)
Added: AssignUnitStance (attach this to unit-producing actors, together with what stances can be picked as 'default')
2010-11-13 17:26:42 +13:00

21 lines
549 B
C#

using OpenRA.Traits;
namespace OpenRA.Mods.RA
{
public class UnitStanceNoneInfo : ITraitInfo
{
public readonly bool Default = false;
public object Create(ActorInitializer init) { return new UnitStanceNone(init.self, this); }
}
public class UnitStanceNone : UnitStance
{
public readonly UnitStanceNoneInfo Info;
public UnitStanceNone(Actor self, UnitStanceNoneInfo info)
{
Info = info;
Active = (self.World.LocalPlayer == self.Owner || (self.Owner.IsBot && Game.IsHost)) ? Info.Default : false;
}
}
}