void LoadToWarehouse() { if (BeltActCall.GoodsOnBelt != null) { ObjectActCall.IsWorking = true; if (GoodsValueCall.CheckMovingState(int.Parse(BeltActCall.GoodsOnBelt.name)) == 0) { SalesValueCall.UpdateItemCount(CompanyManagerCall.PlayerCompanyName, GoodsValueCall.FindGoodsName(BeltActCall.GoodsOnBelt)); GoodsValueCall.ChangeInMapState(int.Parse(BeltActCall.GoodsOnBelt.name), false, null); Destroy(BeltActCall.GoodsOnBelt); BeltActCall.GoodsOnBelt = null; } } else { ObjectActCall.IsWorking = false; } }
void StockManage() { int Difference = 0; switch (Name) { case "General Industry Co.": Difference = 999 - GoodsValueCall.GetGoodsCount("Paper roll", true); if (Difference > 0) { for (int i = 0; i < Difference; i++) { GoodsValueCall.AddGoodsArray("Paper roll", Random.Range(0.8f, 1f)); } } break; case "Federal Agency of Industry": Difference = 999 - GoodsValueCall.GetGoodsCount("Plastic mass", true); if (Difference > 0) { for (int i = 0; i < Difference; i++) { GoodsValueCall.AddGoodsArray("Plastic mass", Random.Range(0.5f, 1f)); } } Difference = 999 - GoodsValueCall.GetGoodsCount("Silicon mass", true); if (Difference > 0) { for (int i = 0; i < Difference; i++) { GoodsValueCall.AddGoodsArray("Silicon mass", Random.Range(0.7f, 1f)); } } break; // case "Sasio" : // Difference = 999 - GoodsValueCall.GetGoodsCount("Packaged Cal-100", true); // if(Difference > 0) // { // for(int i = 0; i < Difference; i++) // { // GoodsValueCall.AddGoodsArray("Packaged Cal-100", Random.Range(0.6f, 0.8f)); // } // } // Difference = 999 - GoodsValueCall.GetGoodsCount("Cal-100", true); // if(Difference > 0) // { // for(int i = 0; i < Difference; i++) // { // GoodsValueCall.AddGoodsArray("Cal-100", Random.Range(0.6f, 0.8f)); // } // } // Difference = 999 - GoodsValueCall.GetGoodsCount("CM100", true); // if(Difference > 0) // { // for(int i = 0; i < Difference; i++) // { // GoodsValueCall.AddGoodsArray("CM100", Random.Range(0.6f, 0.8f)); // } // } // break; } SalesValueCall.UpdateItemCount(Name); }