コード例 #1
0
    public void DeselectEverything()
    {
        hexGrid.DeselectAllCells();
        unitManager.DeselectAllUnits();

        terrainPanel.SetActive(false);
        if (currentSelectedCell != null)
        {
            currentSelectedCell.DeselectCell();
            currentSelectedCell = null;
        }

        if (currentSelectedCity != null)
        {
            currentSelectedCity.DeselectCity();
            currentSelectedCity = null;
        }


        if (currentSelectedUnit != null)
        {
            currentSelectedUnit.DeselectUnit();
            currentSelectedUnit = null;
        }

        civManager.UnselectAllCities();
        hexCamera.UnsetGameObjectToFollow();
    }