示例#1
0
        public FrozenActor(Actor self, PPos[] footprint, Shroud shroud)
        {
            actor = self;
            this.shroud = shroud;

            // Consider all cells inside the map area (ignoring the current map bounds)
            Footprint = footprint
                .Where(m => shroud.Contains(m))
                .ToArray();

            CenterPosition = self.CenterPosition;
            Bounds = self.Bounds;

            UpdateVisibility();
        }
示例#2
0
		public FrozenActor(Actor self, PPos[] footprint, Shroud shroud, bool startsRevealed)
		{
			actor = self;
			this.shroud = shroud;
			NeedRenderables = startsRevealed;
			removeFrozenActors = self.TraitsImplementing<IRemoveFrozenActor>().ToArray();

			// Consider all cells inside the map area (ignoring the current map bounds)
			Footprint = footprint
				.Where(m => shroud.Contains(m))
				.ToArray();

			CenterPosition = self.CenterPosition;
			Bounds = self.Bounds;
			TargetTypes = self.TraitsImplementing<ITargetable>().Where(Exts.IsTraitEnabled).SelectMany(t => t.TargetTypes).ToHashSet();

			UpdateVisibility();
		}