Example #1
0
        public bool MoveBy(int x, int y, int depth)
        {
            if (!CurrentLevel.InBounds(X + x, Y + y))
            {
                return(false);
            }
            bool canMove = Ai.CanMove(X + x, Y + y, Depth + depth);

            if (canMove)
            {
                X += x;
                Y += y;
                //if (depth != 0) CurrentLevel.SwitchCreatureLevel(this, Depth + depth);
            }
            HasMoved = canMove;
            return(HasMoved);
        }