public void BulldozerButtonSelect() { CallValue.ModeSelector(1); if (CallValue.ModeBit[1]) { BulldozeImageObject.SetActive(true); } else { BulldozeImageObject.SetActive(false); } }
public void DisplaySidePanel(string Type) { ValueCall.ModeSelector(0); if (CurrentSidePanel != null) { if (CurrentSidePanel.name == Type) { CloseCurrentSidePanel(); return; } else { CloseCurrentSidePanel(); } } if (NewsPanelControllerCall.isExpanded) { NewsPanelControllerCall.NewsExpandSelect(); } switch (Type) { case "ConstructPanel": SidePanelCarrier.GetComponent <RectTransform>().sizeDelta = new Vector2(CurrentUIsize * 4, Screen.height - CurrentUIsize); CurrentSidePanel = SidePanelList[0]; CurrentSidePanel.GetComponent <ConstructPanelController>().CallPanelController = gameObject.GetComponent <PanelController>(); CurrentSidePanel.SetActive(true); if (!CurrentSidePanel.GetComponent <ConstructPanelController>().isInitialized) { CurrentSidePanel.GetComponent <ConstructPanelController>().Scaling(); CurrentSidePanel.GetComponent <ConstructPanelController>().isInitialized = true; } CurrentSidePanel.GetComponent <ConstructPanelController>().Initializing(); break; case "ContractPanel": SidePanelCarrier.GetComponent <RectTransform>().sizeDelta = new Vector2(CurrentUIsize * 12, Screen.height - CurrentUIsize); CurrentSidePanel = SidePanelList[1]; CurrentSidePanel.GetComponent <ContractPanelController>().CallPanelController = gameObject.GetComponent <PanelController>(); CurrentSidePanel.SetActive(true); if (!CurrentSidePanel.GetComponent <ContractPanelController>().isInitialized) { CurrentSidePanel.GetComponent <ContractPanelController>().Scaling(); CurrentSidePanel.GetComponent <ContractPanelController>().isInitialized = true; } CurrentSidePanel.GetComponent <ContractPanelController>().Initializing(); break; case "ProcessingPanel": SidePanelCarrier.GetComponent <RectTransform>().sizeDelta = new Vector2(CurrentUIsize * 12, Screen.height - CurrentUIsize); CurrentSidePanel = SidePanelList[2]; CurrentSidePanel.GetComponent <ProcessingPanelController>().CallPanelController = gameObject.GetComponent <PanelController>(); CurrentSidePanel.SetActive(true); if (!CurrentSidePanel.GetComponent <ProcessingPanelController>().isInitialized) { CurrentSidePanel.GetComponent <ProcessingPanelController>().Scaling(); CurrentSidePanel.GetComponent <ProcessingPanelController>().isInitialized = true; } CurrentSidePanel.GetComponent <ProcessingPanelController>().Initializing(); break; case "ProductPanel": SidePanelCarrier.GetComponent <RectTransform>().sizeDelta = new Vector2(CurrentUIsize * 12, Screen.height - CurrentUIsize); CurrentSidePanel = SidePanelList[3]; CurrentSidePanel.GetComponent <ProductPanelController>().CallPanelController = gameObject.GetComponent <PanelController>(); CurrentSidePanel.SetActive(true); if (!CurrentSidePanel.GetComponent <ProductPanelController>().isInitialized) { CurrentSidePanel.GetComponent <ProductPanelController>().Scaling(); CurrentSidePanel.GetComponent <ProductPanelController>().isInitialized = true; } CurrentSidePanel.GetComponent <ProductPanelController>().Initializing(); break; case "WorkerPanel": SidePanelCarrier.GetComponent <RectTransform>().sizeDelta = new Vector2(CurrentUIsize * 8, Screen.height - CurrentUIsize); CurrentSidePanel = SidePanelList[4]; CurrentSidePanel.GetComponent <WorkerPanelController>().CallPanelController = gameObject.GetComponent <PanelController>(); CurrentSidePanel.SetActive(true); if (!CurrentSidePanel.GetComponent <WorkerPanelController>().isInitialized) { CurrentSidePanel.GetComponent <WorkerPanelController>().Scaling(); CurrentSidePanel.GetComponent <WorkerPanelController>().isInitialized = true; } CurrentSidePanel.GetComponent <WorkerPanelController>().Initializing(); break; case "ManagePanel": break; case "EconomyPanel": SidePanelCarrier.GetComponent <RectTransform>().sizeDelta = new Vector2(CurrentUIsize * 16, Screen.height - CurrentUIsize); CurrentSidePanel = SidePanelList[6]; CurrentSidePanel.GetComponent <EconomyPanelController>().CallPanelController = gameObject.GetComponent <PanelController>(); CurrentSidePanel.SetActive(true); if (!CurrentSidePanel.GetComponent <EconomyPanelController>().isInitialized) { CurrentSidePanel.GetComponent <EconomyPanelController>().Scaling(); CurrentSidePanel.GetComponent <EconomyPanelController>().isInitialized = true; } CurrentSidePanel.GetComponent <EconomyPanelController>().Initializing(); break; case "GoodsCreatorPanel": SidePanelCarrier.GetComponent <RectTransform>().sizeDelta = new Vector2(CurrentUIsize * 12, Screen.height - CurrentUIsize); CurrentSidePanel = SidePanelList[7]; CurrentSidePanel.GetComponent <GoodsCreatorPanelController>().CallPanelController = gameObject.GetComponent <PanelController>(); CurrentSidePanel.SetActive(true); if (!CurrentSidePanel.GetComponent <GoodsCreatorPanelController>().isInitialized) { CurrentSidePanel.GetComponent <GoodsCreatorPanelController>().Scaling(); CurrentSidePanel.GetComponent <GoodsCreatorPanelController>().isInitialized = true; } CurrentSidePanel.GetComponent <GoodsCreatorPanelController>().Initializing(); break; case "ProcessorPanel": SidePanelCarrier.GetComponent <RectTransform>().sizeDelta = new Vector2(CurrentUIsize * 12, Screen.height - CurrentUIsize); CurrentSidePanel = SidePanelList[8]; CurrentSidePanel.GetComponent <ProcessorPanelController>().CallPanelController = gameObject.GetComponent <PanelController>(); CurrentSidePanel.SetActive(true); if (!CurrentSidePanel.GetComponent <ProcessorPanelController>().isInitialized) { CurrentSidePanel.GetComponent <ProcessorPanelController>().Scaling(); CurrentSidePanel.GetComponent <ProcessorPanelController>().isInitialized = true; } CurrentSidePanel.GetComponent <ProcessorPanelController>().Initializing(); break; case "LabatoryResearchPanel": SidePanelCarrier.GetComponent <RectTransform>().sizeDelta = new Vector2(CurrentUIsize * 12, Screen.height - CurrentUIsize); CurrentSidePanel = SidePanelList[9]; CurrentSidePanel.GetComponent <LabatoryResearchPanelController>().CallPanelController = gameObject.GetComponent <PanelController>(); CurrentSidePanel.SetActive(true); if (!CurrentSidePanel.GetComponent <LabatoryResearchPanelController>().isInitialized) { CurrentSidePanel.GetComponent <LabatoryResearchPanelController>().Scaling(); CurrentSidePanel.GetComponent <LabatoryResearchPanelController>().isInitialized = true; } CurrentSidePanel.GetComponent <LabatoryResearchPanelController>().Initializing(); break; case "LabatoryDevelopPanel": SidePanelCarrier.GetComponent <RectTransform>().sizeDelta = new Vector2(CurrentUIsize * 12, Screen.height - CurrentUIsize); CurrentSidePanel = SidePanelList[10]; CurrentSidePanel.GetComponent <LabatoryDevelopPanelController>().CallPanelController = gameObject.GetComponent <PanelController>(); CurrentSidePanel.SetActive(true); if (!CurrentSidePanel.GetComponent <LabatoryDevelopPanelController>().isInitialized) { CurrentSidePanel.GetComponent <LabatoryDevelopPanelController>().Scaling(); CurrentSidePanel.GetComponent <LabatoryDevelopPanelController>().isInitialized = true; } CurrentSidePanel.GetComponent <LabatoryDevelopPanelController>().Initializing(); break; } }