public void DisplayFinalResult(FinalResult result, MedalRow.MedalType[] medalTypes) { var text = result.ToString().ToUpper(); transform.Find("FinalResult").GetComponent <Text>().text = text; var medalRows = transform.GetComponentsInChildren <MedalRow>(); var i = 0; foreach (var medalType in medalTypes) { medalRows[i++].SetMedalType(medalType); } }
//Calculates the Total value of all boxes /// <summary> /// Calculates the Total value of all boxes /// </summary> /// <returns> /// Total calculated value /// </returns> public string GetCheckoutValue() { decimal FinalResult; //this if else statment is to prevent bugs with the + and - for the total value if (decimal.Parse(Allbalance.Text) < 0) { FinalResult = decimal.Parse(Allbalance.Text) + decimal.Parse(CountedCash.Text); return(CheckOut.Text = FinalResult.ToString()); } else { FinalResult = decimal.Parse(Allbalance.Text) - decimal.Parse(CountedCash.Text); return(CheckOut.Text = FinalResult.ToString()); } }
public static void ViewResult(FinalResult s) { Console.WriteLine("\nYour resuls of this game: {0}", s.ToString().ToUpper()); }