protected void Awake() { bankBalance = PlayerPrefs.GetInt(companyName, startingBankBal); // TakeProfit(0); TakeLoss((uint)InFieldProfitLoss.GetLoss(companyName)); InFieldProfitLoss.SetLoss(companyName, 0); TakeProfit((uint)InFieldProfitLoss.GetProfit(companyName)); InFieldProfitLoss.SetProfit(companyName, 0); }
public void ShowResults() { gameObject.SetActive(true); JWHDmgTxt.text = NumJWHDmg.ToString(); WhalesTrtdTxt.text = NumTreatedWhales.ToString(); WhalesLostTxt.text = NumWhalesLost.ToString(); GlobalFunctions.AddDJINDamage(NumJWHDmg); GlobalFunctions.AddWhalesLost(NumWhalesLost); GlobalFunctions.AddWhalesSaved(NumTreatedWhales); LBManager.Instance.ReportAllProgress(); RsltTxt.text = RsltStrng; ShipDmgTxt.text = ((1 - GameManager.instance.playerObject.GetComponent <Health>().GetHlthinPerOne()) * 100).ToString(); InFieldProfitLoss.SetLoss("JWH", NumJWHDmg); InFieldProfitLoss.SetProfit("Tasso", NumTreatedWhales + (int)(NumJWHDmg * 0.2f)); InFieldProfitLoss.SetLoss("Tasso", NumWhalesLost * 50); }