/// <summary> /// Changes to an ending depending on the current state of the pet. /// </summary> public void toStandardEnding() { int formIndex = petForm.getPetFormIndex(); string targetSceneName = petStatus.isSatisfied() ? goodEndingScenes[formIndex] : badEndingScenes[formIndex]; changeScenes(targetSceneName); }
public void playRandomNeutralSound() { if (!soundEffectSource.isPlaying) { int petFormIndex = petForm.getPetFormIndex(); List <AudioClip> soundEffectOptions = petFormSoundEffects[petFormIndex].neutralSoundEffects; int randomIndex = UnityEngine.Random.Range(0, soundEffectOptions.Count); AudioClip newEffect = soundEffectOptions[randomIndex]; soundEffectSource.PlayOneShot(newEffect, 1); } }