Пример #1
0
    private void SelectObject(GameObject obj)
    {
        SelectedObject = obj;

        if (obj.GetComponentInParent <UnitInfo>())
        {
            playerInput.CurrentState = State.unitSelected;
            uiPanelManager.OpenPanelAndClosePanel <UnitPanel, BuildingInfoPanel>();
        }
        else if (obj.GetComponentInParent <BuildingInfo>())
        {
            playerInput.CurrentState = State.buildingSelected;
            uiPanelManager.OpenPanelAndClosePanel <BuildingInfoPanel, UnitPanel>();
        }
    }
Пример #2
0
 public void OnInfrastructurePressed()
 {
     uiPanelManager.OpenPanelAndClosePanel <ChooseInfrastructurePanel, ChooseBuildingPanel>();
 }