public void Respond(int answer) { if (answer == questions[questionNumber].correctOption) { minigameController.AddPoints(3); correctDisplay.text = "Correct!"; correctDisplay.GetComponent <Animator>().SetBool("Correct", true); StartCoroutine(NextQuestion()); } else { minigameController.AddPoints(-1); correctDisplay.GetComponent <Animator>().SetBool("Correct", false); correctDisplay.text = "Incorrect!"; } correctDisplay.GetComponent <Animator>().SetTrigger("Go"); }
private void OnTriggerEnter(Collider other) { if (other.tag != "Player") { return; } minigameController.AddPoints(1); //other.GetComponentInParent<TopDown2DMovement>().thisPlayer.mingamePts++; Destroy(gameObject); }