void animalSaved(Animal_Controller.ANIMAL_TYPE type) { switch (type) { case Animal_Controller.ANIMAL_TYPE.CHICKEN: chickenSource.Play(); break; case Animal_Controller.ANIMAL_TYPE.COW: cowSource.Play(); break; case Animal_Controller.ANIMAL_TYPE.PIG: pigSource.Play(); break; default: break; } }
public void EventAnimalSaved(Animal_Controller.ANIMAL_TYPE type) { // Add Points depending on animal // Change Animals Saved // Check if equals Animals Needed // if so, then enter round over state switch (type) { case Animal_Controller.ANIMAL_TYPE.COW: points += 10; break; case Animal_Controller.ANIMAL_TYPE.PIG: points += 25; break; case Animal_Controller.ANIMAL_TYPE.CHICKEN: points += 50; break; default: break; } animalsSaved++; if (animalsSaved >= animalsNeeded) { // Change state to round over // Start coroutine // Do only if state is in play, then call method end round given round number if (state == ROUND_STATE.PLAY) { StartCoroutine("EndRoundCoroutine"); } } }
public void EventAnimalCaptured(Animal_Controller.ANIMAL_TYPE type) { // subtract points? // add multiplier when chaining animal saving? }