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>(); } }
public void OnInfrastructurePressed() { uiPanelManager.OpenPanelAndClosePanel <ChooseInfrastructurePanel, ChooseBuildingPanel>(); }