Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Update() {
- var str : String = "";
- if (!hasLost) {
- str = numHits.ToString();
- }
- else {
- str = "Hits:" + numHits.ToString() + "\nYour Best:" + bestScore;
- if (bestScore > lastBest) str += "\nNEW RECORD!";
- }
- hitCount.text = str;
- if (transform.position.y <-3) {
- if (!hasLost) {
- hasLost = true;
- lastBest =bestScore;
- if(numHits > bestScore) {
- bestScore = numHits;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement