public bool ValidateProductIdInRecipe(int productId, int productionOrderId, typeEnum type) { Console.WriteLine("MyLog2"); Console.WriteLine(GetProductionOrderApi(productionOrderId).Result); Console.WriteLine("MyLog3"); Console.WriteLine(GetProductionOrderApi(productionOrderId).Result.ToString()); string recipe = GetProductionOrderApi(productionOrderId).Result; bool checkRecipe = false; string ProductName = string.Empty; string ProductionOrderName = string.Empty; // Verifica tipo de processo input ou output switch (type) { case typeEnum.Input: (checkRecipe, ProductName, ProductionOrderName) = CheckProductInRecipe(productId, recipe); break; case typeEnum.Output: (checkRecipe, ProductName, ProductionOrderName) = CheckProductOutRecipe(productId, recipe); break; } return(checkRecipe); }
/// <summary> /// 获取数据 /// </summary> public static AreaDoubleKeysData GetItem(int ID, typeEnum type) { var key = new AreaDoubleKeysKey(); key.ID = ID; key.type = type; return(mData[key]); }
void Update() { if (Input.GetMouseButtonDown(0) && PhotonNetwork.room != null) { ray = Camera.main.ScreenPointToRay(Input.mousePosition); if (Physics.Raycast(ray, out hit)) { buildingGui.SetActive(true); //buildingGui.SetActive(true); BV_BuildingGui buildingGuiScript = buildingGui.GetComponent <BV_BuildingGui>(); type = returnType(hit.transform.gameObject); swapCollider(false); switch (type) { case typeEnum.terrain: { print("SELECTED A TERRAIN"); buildingGuiScript.setBuilding(hit.transform.parent.gameObject); buildingGuiScript.setValues(); break; } case typeEnum.leisure: { print("SELECTED A LEISURE"); buildingGuiScript.setBuilding(hit.transform.gameObject); buildingGuiScript.setValues(); break; } } } } }