示例#1
0
        public override void Execute(Point target)
        {
            if (this.ValidPositions == null || this.ValidPositions.Count == 0)
            {
                return;
            }

            int   randomIndex = this.random.Next(this.ValidPositions.Count);
            Point position    = this.ValidPositions[randomIndex];

            PlacementHelper.Move(this.Unit, position, new MovementActionValidator());
        }
示例#2
0
        private void SuckIn()
        {
            if (mask == null)
            {
                return;
            }

            Point returningPosition = mask.GetPosition();
            bool  removed           = RemoveBodyParts(mask);

            if (removed)
            {
                PlacementHelper.Move(this.Unit, returningPosition, new MovementActionValidator());
                this.intestines.ForEach(i => RemoveBodyParts(i));
                this.intestines = null;
            }
        }