Пример #1
0
        /// <summary>
        /// Checks the block clicked.
        /// </summary>
        /// <returns>The block clicked.</returns>
        /// <param name="touchPos">Touch position.</param>
        public Block CheckBlockClicked(Position touchPos)
        {
            foreach (Block block in this.SelectedField.Blocks)
            {
                if (GeoHelper.IsInsideCoords(block.BoundingCoordinates, touchPos))
                {
                    return(block);
                }
            }

            return(null);
        }
Пример #2
0
        /// <summary>
        /// Checks the field clicked.
        /// </summary>
        /// <returns>The field clicked.</returns>
        /// <param name="touchPos">Touch position.</param>
        public Field CheckFieldClicked(Position touchPos)
        {
            foreach (Field field in this.Fields)
            {
                if (GeoHelper.IsInsideCoords(field.BoundingCoordinates, touchPos))
                {
                    return(field);
                }
            }

            return(null);
        }