Remove Actor.HasTrait<T>()

This commit is contained in:
atlimit8
2015-08-01 23:53:58 -05:00
parent 959914779f
commit 85fab45451
79 changed files with 153 additions and 153 deletions

View File

@@ -35,7 +35,7 @@ namespace OpenRA.Mods.Common.Traits
readonly bool startsRevealed;
readonly PPos[] footprint;
readonly Lazy<IToolTip> tooltip;
readonly Lazy<ITooltip> tooltip;
readonly Lazy<Health> health;
readonly Dictionary<Player, bool> visible;
@@ -53,7 +53,7 @@ namespace OpenRA.Mods.Common.Traits
startsRevealed = info.StartsRevealed && !init.Contains<ParentActorInit>();
var footprintCells = FootprintUtils.Tiles(init.Self).ToList();
footprint = footprintCells.SelectMany(c => map.ProjectedCellsCovering(c.ToMPos(map))).ToArray();
tooltip = Exts.Lazy(() => init.Self.TraitsImplementing<IToolTip>().FirstOrDefault());
tooltip = Exts.Lazy(() => init.Self.TraitsImplementing<ITooltip>().FirstOrDefault());
health = Exts.Lazy(() => init.Self.TraitOrDefault<Health>());
frozen = new Dictionary<Player, FrozenActor>();