void VerifyCup(CupController cup) { if (order.Compare(cup.drink)) { this.order = DrinkGenerator.Generate(); textBoxManager.Add("HMM MM GOOD.\nTIP FOR YOU.\nNow, give me a " + order.ToString() + "."); sprite.sprite = happy; Sounds.EatSound(); Sounds.ChangeSound(); streak++; streakText.text = "Current Streak: " + streak; Tip(); } else { textBoxManager.Add("NO! You gave me a " + cup.drink.ToString() + ".\nGive me a " + order.ToString() + "."); if (angry != null) { sprite.sprite = angry; } Sounds.WrongSound(); streak = 0; streakText.text = "Current Streak: " + streak; } }
void Start() { speed = 6.0f; order = DrinkGenerator.Generate(); target = GameObject.Find("customerPosition").transform; startTime = Time.time; sprite = GetComponent <SpriteRenderer>(); enableText = true; happy = sprite.sprite; textBoxManager = GameObject.Find("TextBoxManager").GetComponent <TextBoxManager>(); //print(order.ToString()); }