コード例 #1
0
 // update the order total, tip, final amound, and customer billing
 public void updateBillText()
 {
     orderTotal.text       = billItem.getOrderTotal().ToString("C2"); // C2 used to round to 2 decimal places
     tip.text              = billItem.getTip().ToString("C2");
     finalAmount.text      = billItem.getFinalAmount().ToString("C2");
     evenCustomerBill.text = billItem.getEvenBill().ToString("C2");
 }
コード例 #2
0
 // Use this for initialization
 void Start()
 {
     // Displays the initial values held for each variable
     orderTotal.text    = items.getOrderTotal().ToString();
     tip.text           = items.tip.ToString();
     finalAmount.text   = items.finalAmount.ToString();
     customerCount.text = items.customerCount.ToString();
     evenBilling.text   = items.evenBill.ToString();
 }