//takes a TaskEvent and removes it from the list, noting whether or not it was succesful public void TaskEventFinished(TaskEvent taskEvent) { if (!taskEvent.IsSuccessful()) { removeLife(); } else if (taskEvent.IsSuccessful()) { // update score if (taskEvent.task.taskName == "Plane Landing") { calculateScore(20); } else { calculateScore(10); } } taskEventList.Remove(taskEvent); Destroy(taskEvent.gameObject); UpdateTaskListText(); }