private void GivePlayerMonies() { if (forexInvestedValue > 0f) { if (lc.economyState == -1) { forexInvestedValue = 0f; } if (lc.economyState == 0) { } if (lc.economyState == 1) { forexInvestedValue *= 2f; } while (forexInvestedValue >= 5f) { cc.SpawnMoney(cc.fiveDollars, 5f); forexInvestedValue -= 5f; } while (forexInvestedValue >= 1f) { cc.SpawnMoney(cc.oneDollar, 1f); forexInvestedValue -= 1f; } while (forexInvestedValue >= 0.5f) { cc.SpawnMoney(cc.fiftyCents, 0.5f); forexInvestedValue -= 0.5f; } forexInvestedValue = 0f; } if (bankReturnValue > 0f) { while (bankReturnValue >= 5f) { cc.SpawnMoney(cc.fiveDollars, 5f); bankReturnValue -= 5f; } while (bankReturnValue >= 1f) { cc.SpawnMoney(cc.oneDollar, 1f); bankReturnValue -= 1f; } while (bankReturnValue >= 0.5f) { cc.SpawnMoney(cc.fiftyCents, 0.5f); bankReturnValue -= 0.5f; } bankReturnValue = 0; } cc.IsThereLeader(); CanvasController.cac.UpdateCashText(); }