Ejemplo n.º 1
0
        /// <summary>
        /// Returns the index of the roof the character standing at the point
        /// ptx, pty.  -1 if no roof.
        /// </summary>
        /// <param name="ptx"></param>
        /// <param name="pty"></param>
        /// <returns></returns>
        private int CharInRoof(int ptx, int pty)
        {
            for (int i = 0; i < TheMap.Roofs.Count; i++)
            {
                Roof r = TheMap.Roofs[i];

                if (r.CharIn(ptx, pty, false))
                {
                    return(i);
                }
            }

            return(-1);
        }