Revamp cloak model

This commit is contained in:
Paul Chote
2010-08-15 04:53:23 +12:00
parent 499613f105
commit 7f191887ec
9 changed files with 74 additions and 34 deletions

View File

@@ -14,13 +14,23 @@ using System.Linq;
namespace OpenRA.Traits
{
public class TargetableInfo : TraitInfo<Targetable>
public class TargetableInfo : ITraitInfo
{
public readonly string[] TargetTypes = {};
public object Create( ActorInitializer init ) { return new Targetable(this); }
}
public class Targetable
public class Targetable : ITargetable
{
TargetableInfo Info;
public Targetable(TargetableInfo info)
{
Info = info;
}
public string[] TargetTypes
{
get { return Info.TargetTypes;}
}
}
}