Example #1
0
        //根据坐标返回所点击的cell
        public HexCellView GetCellByPosition(Vector3 position)
        {
            HexCellView cell = null;

            position = transform.InverseTransformPoint(position);
            if (HexUtil.CheckOnHexGrid(position, this.modelInfo))
            {
                HexCoordinates coordinates = HexUtil.FromPosition(position, this.modelInfo);
                cell = cellViewMap[coordinates];
            }
            return(cell);
        }