private void OnStartEvaluation(GameManager.RESULTS result) { if (result == GameManager.RESULTS.GOOD) { StartCoroutine(EvaluateScore(result)); } }
private IEnumerator EvaluateScore(GameManager.RESULTS result) { //WaitForSeconds wait = new WaitForSeconds(TimeBetweenEvaluations); bool inside = false; foreach (Word w in WordManager.Instance.wordList) { Debug.Log("Word: " + w.transform.GetChild(0).name); // Every Word foreach (Collider2D coll in collidersInside) { if (coll.gameObject == w.transform.GetChild(0).gameObject) { inside = true; break; } } if (inside) { // Word Inside Box if (!Physics2D.IsTouching(w.transform.GetChild(0).GetComponent <Collider2D>(), edgeCollider)) { //Word Inside not on Line AdjustMoodForLeaders(w, true, w.isEssential); } else { //Word "Outside" on Line AdjustMoodForLeaders(w, false, w.isEssential); } } else { // Word not in Box AdjustMoodForLeaders(w, false, w.isEssential); } inside = false; yield return(new WaitForSeconds(1F)); } yield return(new WaitForSeconds(1F)); collidersInside.Clear(); onEvaluationFinshed(result); }
private void OnEndGame(GameManager.RESULTS result) { startFading = true; }
private void OnEndGame(GameManager.RESULTS result) { StartDestroyYourself(); }
private void OnEvaluate(GameManager.RESULTS result) { ProgressBarObject.Progress = 0; ProgressBarObject.ProgressBarColor = new Color(ProgressBarObject.ProgressBarColor.r, ProgressBarObject.ProgressBarColor.g, ProgressBarObject.ProgressBarColor.b, 0); TimeRemainingTextObject.text = "0.00s"; }