private void Update() { if (Input.GetKeyDown(KeyCode.L)) { AddPoints(100, "LOOKING COOL JOKER"); } //Handle waiting for the text. if (waiting_comment) { if (points_text.IsFinished()) { waiting_c_duration += Time.deltaTime; if (waiting_c_duration >= comment_duration) { points_text.RemoveText(true); waiting_comment = false; } } } if (waiting_score_c) { if (cur_points.IsUpdatingScore()) { waiting_s_duration += Time.deltaTime; if (waiting_s_duration > score_duration) { cur_points.DisableScore(); waiting_score_c = false; waiting_s_duration = 0; adding_scores = true; } } } else if (adding_scores && !cur_points.IsOnScreen()) { total_points.AddPoints(cur_points.wanted_score); txbx.Animate(); adding_scores = false; } //Handle waiting for the score total else if (waiting_score_t) { if (total_points.IsUpdatingScore()) { waiting_s_duration += Time.deltaTime; if (waiting_s_duration > score_duration) { total_points.DisableScore(); waiting_score_t = false; cur_points.reset_score(); } } } }