Пример #1
0
 private void OnHexUnderMouseChanged(HexCell hexCell)
 {
     if (hexCell.IsValid)
     {
         m_HoverItem = HexHighlighter.PlaceHighlighter(hexCell, Highlighter.white_light, m_HoverItem);
     }
     else
     {
         m_HoverItem.Release();
         m_HoverItem = null;
     }
 }
Пример #2
0
        private void OnHexSelected(HexCell hex)
        {
            var pos       = HexUtility.FindIntersectingHexCell(new int2(-4, 2), hex.Position);
            var middleHex = new HexCell(pos);

            m_Item = HexHighlighter.PlaceHighlighter(middleHex, Highlighter.blue, m_Item);
        }
        // Private ---

        private void PlaceHighlighterItem(int2 cell)
        {
            m_HighlightItem = HexHighlighter.PlaceHighlighter(cell, Highlighter.white, m_HighlightItem);
        }