// Start is called before the first frame update void Start() { GoodsValueCall = GameObject.Find("CompanyManager").GetComponent <CompanyManager>().GetPlayerCompanyValue().GetGoodsValue().GetComponent <GoodsValue>(); GoodsRecipeCall = GameObject.Find("BaseSystem").GetComponent <GoodsRecipe>();; Goods = GameObject.Find("Goods"); ObjectActCall = gameObject.GetComponent <InstallableObjectAct>(); TimeManagerCall = GameObject.Find("TimeManager").GetComponent <TimeManager>(); TargetGoodsRecipe = null; Mover = new GameObject[InputNumber]; PrevBelt = new GameObject[InputNumber]; MoverDetector = new GameObject[InputNumber]; Transform DetectorCarrier = transform.GetChild(2); for (int i = 0; i < InputNumber; i++) { MoverDetector[i] = DetectorCarrier.GetChild(0).GetChild(i).gameObject; } RegisteredInput = new int[InputNumber]; for (int i = 0; i < InputNumber; i++) { RegisteredInput[i] = -1; } WorkLoadPerDay = 0; RealTimeWorkLoadPerDay = 0; TargetSetTime = -1; isWaiting = false; }
// Start is called before the first frame update void Start() { ObjectActCall = gameObject.GetComponent <InstallableObjectAct>(); //InstallableObjectAct 호출 GoodsValueCall = GameObject.Find("CompanyManager").GetComponent <CompanyManager>().GetPlayerCompanyValue().GetGoodsValue().GetComponent <GoodsValue>(); //GoodsValue 호출 CurrentJoinIndex = 0; //합칠 인덱스 AddonObject = null; //애드온 오브젝트 TargetGoods = null; //타겟 물품 NoNeedCheckCurrentIndex = false; //인덱스 확인 필요 여부 CanProceed = false; //진행가능 여부 isInitialized = false; //진행 시작 가능 여부 DetectedObject = new GameObject[InputNumber]; //들어오는 벨트에 확인된 오브젝트들 DetectSensor = new GameObject[InputNumber]; //들어오는 벨트 확인하는 센서들 NextBelt = new GameObject[InputNumber]; PrevBelt = null; PrevBelt2 = new GameObject[InputNumber]; //들어오는 벨트들 NextBelt2 = null; for (int i = 0; i < InputNumber; i++) //센서 오브젝트 받아오기 { // 0 ; Left // 1 : Right DetectSensor[i] = transform.GetChild(2).GetChild(0).GetChild(i).gameObject; //센서 호출 } }
// Start is called before the first frame update void Start() { ObjectActCall = gameObject.GetComponent <InstallableObjectAct>(); CompanyValueCall = GameObject.Find("CompanyManager").GetComponent <CompanyManager>().GetPlayerCompanyValue(); ElectricityValueCall = CompanyValueCall.GetElectricityValue().GetComponent <ElectricityValue>(); CurrentChargingAmount = 0; }
// Start is called before the first frame update void Start() { GoodsValueCall = GameObject.Find("CompanyManager").GetComponent <CompanyManager>().GetPlayerCompanyValue().GetGoodsValue().GetComponent <GoodsValue>(); AddonObjectActCall = gameObject.GetComponent <AddonObjectAct>(); ObjectActCall = gameObject.GetComponent <InstallableObjectAct>(); LR = 0; isInitialized = false; }
// Start is called before the first frame update void Start() { GoodsValueCall = GameObject.Find("CompanyManager").GetComponent <CompanyManager>().GetPlayerCompanyValue().GetGoodsValue().GetComponent <GoodsValue>(); ObjectActCall = gameObject.GetComponent <InstallableObjectAct>(); TimeManagerCall = GameObject.Find("TimeManager").GetComponent <TimeManager>(); isWaiting = false; isInitialized = false; MoverDetector = transform.GetChild(2).GetChild(0).GetChild(0).gameObject; PrevBeltDetector = transform.GetChild(2).GetChild(1).GetChild(0).gameObject; }
// Start is called before the first frame update void Start() { BaseSystem = GameObject.Find("BaseSystem"); ObjectActCall = gameObject.GetComponent <InstallableObjectAct>(); CompanyManagerCall = GameObject.Find("CompanyManager").GetComponent <CompanyManager>(); GoodsValueCall = CompanyManagerCall.GetPlayerCompanyValue().GetGoodsValue().GetComponent <GoodsValue>(); SalesValueCall = GameObject.Find("SalesManager").GetComponent <SalesValue>(); MoverDetector = transform.GetChild(2).GetChild(0).GetChild(0).gameObject; WarehouseDetector = transform.GetChild(2).GetChild(1).GetChild(0).gameObject; isInitialized = false; }
// Start is called before the first frame update void Start() { CompanyManagerCall = GameObject.Find("CompanyManager").GetComponent <CompanyManager>(); GoodsValueCall = CompanyManagerCall.GetPlayerCompanyValue().GetGoodsValue().GetComponent <GoodsValue>(); SalesValueCall = GameObject.Find("SalesManager").GetComponent <SalesValue>(); ObjectActCall = gameObject.GetComponent <InstallableObjectAct>(); Goods = GameObject.Find("Goods"); DummyBeltActCall = DummyBelt.GetComponent <BeltAct>(); MoverDetector = transform.GetChild(2).GetChild(0).GetChild(0).gameObject; WarehouseDetector = transform.GetChild(2).GetChild(1).GetChild(0).gameObject; TargetGoodsName = "None"; }
// Start is called before the first frame update void Start() { BaseSystem = GameObject.Find("BaseSystem"); ObjectActCall = gameObject.GetComponent <InstallableObjectAct>(); CompanyManagerCall = GameObject.Find("CompanyManager").GetComponent <CompanyManager>(); CompanyValueCall = ObjectActCall.CompanyValueCall; TimeManagerCall = GameObject.Find("TimeManager").GetComponent <TimeManager>(); TechRecipeCall = BaseSystem.GetComponent <TechRecipe>(); TechValueCall = CompanyManagerCall.GetCompanyValue(CompanyValueCall.CompanyName).GetTechValue().GetComponent <TechValue>(); NotificationManagerCall = GameObject.Find("NotificationManager").GetComponent <NotificationManager>(); GoodsRecipeCall = BaseSystem.GetComponent <GoodsRecipe>(); PanelControllerCall = GameObject.Find("Canvas").GetComponent <PanelController>(); CurrentResearchingTech = null; resultObject = new ResultObject(); }
public void AddStorage(GameObject Object) { StorageInfo newStorage = new StorageInfo(); WarehouseObjectAct WarehouseObjectActCall = Object.GetComponent <WarehouseObjectAct>(); InstallableObjectAct ObjectActCall = Object.GetComponent <InstallableObjectAct>(); newStorage.StorageType = WarehouseObjectActCall.StorageType; newStorage.Capacity = WarehouseObjectActCall.Capacity; newStorage.Object = Object; StorageList.Add(newStorage); TotalCapacity += newStorage.Capacity; if (CompanyValueCall.CompanyName == CompanyManagerCall.PlayerCompanyName) { PanelControllerCall.UpdateFactoryInfo("Warehouse", GetStoredGoods().Count, TotalCapacity); } }
// Start is called before the first frame update void Start() { ObjectActCall = gameObject.GetComponent <InstallableObjectAct>(); GoodsValueCall = GameObject.Find("CompanyManager").GetComponent <CompanyManager>().GetPlayerCompanyValue().GetGoodsValue().GetComponent <GoodsValue>(); DistributeIndex = 0; AddonObject = null; TargetGoods = null; GetIndex = false; CanProceed = false; isInitialized = false; Mover = new GameObject[OutputNumber]; MoverDetector = new GameObject[OutputNumber]; NextBelt = new GameObject[OutputNumber]; PrevBelt = null; for (int i = 0; i < OutputNumber; i++) { // 0 ; Left // 1 : Right MoverDetector[i] = transform.GetChild(2).GetChild(0).GetChild(i).gameObject; } }
void GetTargetObject() { TargetObject = CallPanelController.CurrentFloatingPanel.GetComponent <ObjectInfoPanelController>().TargetObject; CallInstallableObjectAct = TargetObject.GetComponent <InstallableObjectAct>(); CallTargetProcessorAct = TargetObject.GetComponent <ProcessorAct>(); }
// Start is called before the first frame update void Start() { ObjectActCall = gameObject.GetComponent <InstallableObjectAct>(); CompanyValueCall = GameObject.Find("CompanyManager").GetComponent <CompanyManager>().GetPlayerCompanyValue(); }
public void DisplayInfo() { InstallableObjectAct TargetBasicInfo = TargetObject.GetComponent <InstallableObjectAct>(); FacilityValue.FacilityInfo TargetValue = TargetBasicInfo.Value; CompanyValue CallCompnayValue = GameObject.Find("CompanyManager").GetComponent <CompanyManager>().GetPlayerCompanyValue(); GoodsRecipe CallGoodsRecipe = GameObject.Find("BaseSystem").GetComponent <GoodsRecipe>(); InfoPanelCarrier.transform.GetChild(1).GetChild(0).gameObject.GetComponent <Text>().text = TargetInfo.Type; InfoPanelCarrier.transform.GetChild(1).GetChild(1).gameObject.GetComponent <Text>().text = TargetInfo.Name; InfoPanelCarrier.transform.GetChild(2).GetChild(0).gameObject.GetComponent <Text>().text = "Consume"; InfoPanelCarrier.transform.GetChild(2).GetChild(1).gameObject.GetComponent <Text>().text = "Electric : " + TargetValue.SuppliedElectricity.ToString() + " / Labor : " + TargetValue.SuppliedLabor.ToString(); InfoPanelCarrier.transform.GetChild(3).GetChild(0).gameObject.GetComponent <Text>().text = "Performance"; switch (TargetInfo.Type) { case "Door": InfoPanelCarrier.transform.GetChild(3).GetChild(1).gameObject.GetComponent <Text>().text = (TargetBasicInfo.WorkSpeed).ToString() + " item/sec"; if (TargetObject.GetComponent <DoorAct>().TargetGoodsName != "None") { AdditionalInfoPanel.SetActive(true); AdditionalInfoPanel.transform.GetChild(0).GetChild(0).gameObject.GetComponent <Image>().sprite = Resources.Load <Sprite>("GameSystem/Goods/Sprite/" + CallGoodsRecipe.GetRecipe(TargetObject.GetComponent <DoorAct>().TargetGoodsName).Type); AdditionalInfoPanel.transform.GetChild(1).gameObject.GetComponent <Text>().text = TargetObject.GetComponent <DoorAct>().TargetGoodsName; } if (TargetObject.GetComponent <DoorAct>().DoorMode == "Ejector") { FunctionPanel.SetActive(true); ButtonCarrier.transform.GetChild(1).GetChild(0).GetChild(0).gameObject.GetComponent <Text>().text = "Select Item"; } break; case "Processor": InfoPanelCarrier.transform.GetChild(1).GetChild(1).gameObject.GetComponent <Text>().text += " " + TargetObject.GetComponent <ProcessorAct>().ProcessorActorName; InfoPanelCarrier.transform.GetChild(3).GetChild(1).gameObject.GetComponent <Text>().text = (TargetObject.GetComponent <ProcessorAct>().WorkTime + TargetBasicInfo.WorkSpeed).ToString() + " item/sec"; InfoPanelCarrier.transform.GetChild(4).GetChild(0).gameObject.GetComponent <Text>().text = "Current Item"; if (TargetObject.GetComponent <ProcessorAct>().TargetGoodsRecipe != null) { AdditionalInfoPanel.SetActive(true); AdditionalInfoPanel.transform.GetChild(0).GetChild(0).gameObject.GetComponent <Image>().sprite = Resources.Load <Sprite>("GameSystem/Goods/Sprite/" + TargetObject.GetComponent <ProcessorAct>().TargetGoodsRecipe.Type); AdditionalInfoPanel.transform.GetChild(1).gameObject.GetComponent <Text>().text = TargetObject.GetComponent <ProcessorAct>().TargetGoodsRecipe.OutputName; } FunctionPanel.SetActive(true); ButtonCarrier.transform.GetChild(1).GetChild(0).GetChild(0).gameObject.GetComponent <Text>().text = "Select Item"; break; case "Belt": InfoPanelCarrier.transform.GetChild(3).GetChild(1).gameObject.GetComponent <Text>().text = (TargetObject.transform.GetChild(1).GetChild(0).gameObject.GetComponent <BeltAct>().BeltSpeed + TargetBasicInfo.WorkSpeed).ToString() + " item/sec"; break; case "Distributor": InfoPanelCarrier.transform.GetChild(3).GetChild(1).gameObject.GetComponent <Text>().text = (TargetBasicInfo.WorkSpeed).ToString() + " item/sec"; break; case "QualityControlUnit": InfoPanelCarrier.transform.GetChild(3).GetChild(1).gameObject.GetComponent <Text>().text = (TargetBasicInfo.WorkSpeed).ToString() + " item/sec"; FunctionPanel.SetActive(true); ButtonCarrier.transform.GetChild(1).GetChild(0).GetChild(0).gameObject.GetComponent <Text>().text = "Set Standard"; break; case "Destroyer": InfoPanelCarrier.transform.GetChild(3).GetChild(1).gameObject.GetComponent <Text>().text = (TargetBasicInfo.WorkSpeed).ToString() + " item/sec"; break; case "Labatory": InfoPanelCarrier.transform.GetChild(3).GetChild(1).gameObject.GetComponent <Text>().text = (TargetBasicInfo.WorkSpeed).ToString() + " point/sec"; FunctionPanel.SetActive(true); if (TargetObject.GetComponent <LabatoryAct>().CurrentResearchingTech == null && TargetObject.GetComponent <LabatoryAct>().CurrentDevelopingProduct == null) { ButtonCarrier.transform.GetChild(0).GetChild(0).gameObject.SetActive(true); ButtonCarrier.transform.GetChild(1).GetChild(0).GetChild(0).gameObject.GetComponent <Text>().text = "Research Technology"; ButtonCarrier.transform.GetChild(0).GetChild(0).GetChild(0).gameObject.GetComponent <Text>().text = "Develop Product"; } else { if (TargetObject.GetComponent <LabatoryAct>().CurrentResearchingTech != null) { AdditionalInfoPanel.SetActive(true); AdditionalInfoPanel.transform.GetChild(1).gameObject.GetComponent <Text>().text = "Researching"; ButtonCarrier.transform.GetChild(1).GetChild(0).GetChild(0).gameObject.GetComponent <Text>().text = "Research Technology"; } else if (TargetObject.GetComponent <LabatoryAct>().CurrentDevelopingProduct != null) { AdditionalInfoPanel.SetActive(true); AdditionalInfoPanel.transform.GetChild(0).GetChild(0).gameObject.GetComponent <Image>().sprite = Resources.Load <Sprite>("GameSystem/Goods/Sprite/" + TargetObject.GetComponent <LabatoryAct>().CurrentDevelopingProduct.ObjectInfo.Type); AdditionalInfoPanel.transform.GetChild(1).gameObject.GetComponent <Text>().text = TargetObject.GetComponent <LabatoryAct>().CurrentDevelopingProduct.Name; ButtonCarrier.transform.GetChild(1).GetChild(0).GetChild(0).gameObject.GetComponent <Text>().text = "Develop Product"; } } break; case "DayRoom": InfoPanelCarrier.transform.GetChild(3).GetChild(1).gameObject.GetComponent <Text>().text = "x " + (TargetObject.GetComponent <DayRoomAct>().CurrentPerformance + TargetBasicInfo.WorkSpeed).ToString(); break; case "EnergyStorage": InfoPanelCarrier.transform.GetChild(3).GetChild(1).gameObject.GetComponent <Text>().text = TargetObject.GetComponent <EnergyStorageAct>().CurrentChargingAmount.ToString() + " point/tic"; break; case "EnergySupplier": ElectricityValue ElectricityValueCall = GameObject.Find("CompanyManager").GetComponent <CompanyManager>().GetPlayerCompanyValue().GetElectricityValue().GetComponent <ElectricityValue>(); InfoPanelCarrier.transform.GetChild(3).GetChild(1).gameObject.GetComponent <Text>().text = "Usage : " + ElectricityValueCall.TotalUsage.ToString() + " / Capacity : " + ElectricityValueCall.ElectricityInputValue.ToString(); break; } }
// Start is called before the first frame update void Start() { ObjectActCall = gameObject.GetComponent <InstallableObjectAct>(); }