示例#1
0
    /// <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);
    }
示例#2
0
    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);
        }
    }