Beispiel #1
0
    public void TouchCell(HexCell touchedCell)
    {
        Active.SelectedCell = touchedCell;
        if (Active.NkmObject != null)
        {
            UseMyGameObject(touchedCell);
        }
        else if (Active.HexCells?.Contains(touchedCell) == true)
        {
            Active.MakeAction(touchedCell);
        }
        else
        {
            if (Active.AbilityToUse != null)
            {
                return;
            }
            //possibility of highlighting with control pressed
            if (!Input.GetKey(KeyCode.LeftControl))
            {
                HexMapDrawer.RemoveHighlights();
            }
            if (touchedCell.CharacterOnCell != null)
            {
                touchedCell.CharacterOnCell.Select();
            }
            else
            {
                Active.CharacterOnMap?.Deselect();
                touchedCell.AddHighlight(Highlights.BlackTransparent);
            }
        }
//		touchedCell.GetArea(HexDirection.Ne, 6, 7).ForEach(c => c.AddHighlight(Highlights.BlueTransparent));
    }