/// <summary> /// Adds reward and destroys the target object. Also adds to score for visual representation. /// </summary> /// <param name="other">The target</param> public void OnTriggerEnter(Collider other) { Debug.Log("Triggered by: " + other); AddReward(2f); score++; scoreText.text = tag + ": " + score; stageGenerator.RespawnTarget(); targetPos = stageGenerator.TargetLocation; }