public CaptureActor(Actor self, Actor target) : base(self, target, EnterBehaviour.Dispose) { actor = target; building = actor.TraitOrDefault<Building>(); capturesInfo = self.Info.TraitInfo<CapturesInfo>(); capturable = target.Trait<Capturable>(); health = actor.Trait<Health>(); }
public CaptureActor(Actor self, Actor target) : base(self, target) { actor = target; building = actor.TraitOrDefault<Building>(); capturesInfo = self.Info.Traits.Get<CapturesInfo>(); capturable = target.Trait<Capturable>(); health = actor.Trait<Health>(); }
void ChangeInfluence( Actor a, Building building, bool isAdd ) { foreach( var u in Footprint.UnpathableTiles( a.Info.Name, a.Info.Traits.Get<BuildingInfo>(), a.Location ) ) if( map.IsInMap( u ) ) blocked[ u.X, u.Y ] = isAdd; foreach( var u in Footprint.Tiles( a.Info.Name, a.Info.Traits.Get<BuildingInfo>(), a.Location ) ) if( map.IsInMap( u ) ) influence[ u.X, u.Y ] = isAdd ? a : null; }
void INotifyCreated.Created(Actor self) { building = self.TraitOrDefault<Building>(); }