예제 #1
0
 void Update()
 {
     transform.position = position;
     //customer has order? display it
     if (order != null)
     {
         text.text = order.ToString().Replace(' ', '\n');
     }
     else
     {
         text.text = "";
     }
     if (submittedFood != null)
     {
         //customer has food placed on them, evaluate the players' efforts
         if (order.CompareTo(submittedFood))
         {
             DoLeave(true);
         }
         else
         {
             GetAngry();
         }
         submittingPlayer = null;
         submittedFood    = null;
     }
     //time's up! customer is gone!
     if (attachedBar.isDone)
     {
         DoLeave(false);
     }
 }