Пример #1
0
 public SoundFile(SoundFileData soundFileDataToAdd)
 {
     soundFileData = soundFileDataToAdd;
 }
Пример #2
0
    private void SetNameAvatarAndAudioDotInSentenceV2(SentenceV2 sentence, DialougeDataV2 dialouge)
    {
        DialougeCharacterDataV2 activeCharacter = new DialougeCharacterDataV2();

        //[ScriptableObjectDropdown(typeof(DialougeCharacterDataV2))] ScriptableObjectReference character;
        switch (sentence.character)
        {
        case CharacterDialougeSelection.characterOne:
            activeCharacter = (DialougeCharacterDataV2)dialouge.character1.value;
            break;

        case CharacterDialougeSelection.characterTwo:
            activeCharacter = (DialougeCharacterDataV2)dialouge.character2.value;
            break;

        case CharacterDialougeSelection.characterThree:
            activeCharacter = (DialougeCharacterDataV2)dialouge.character3.value;
            break;

        case CharacterDialougeSelection.characterFour:
            activeCharacter = (DialougeCharacterDataV2)dialouge.character4.value;
            break;

        case CharacterDialougeSelection.characterFive:
            activeCharacter = (DialougeCharacterDataV2)dialouge.character5.value;
            break;
        }

        dotSoundAudioSource.clip = basicDotSound;

        if (activeCharacter != null)
        {
            if (sentence.emotionSprite != null)
            {
                Debug.Log("Set to sentence emotion sprite");
                AvatarUIObject.sprite = sentence.emotionSprite;
            }
            else if (activeCharacter.characterAvatar != null)
            {
                Debug.Log("Set to character avatar");
                AvatarUIObject.sprite = activeCharacter.characterAvatar;
            }
            if (activeCharacter.characterName != null)
            {
                NPCNameUIObject.text = activeCharacter.characterName;
            }
            if (activeCharacter.characterAudioDot != null)
            {
                activeAudioDot = (SoundFileData)activeCharacter.characterAudioDot.value;
                //dotSoundAudioSource.clip = soundFile.;
                //ServiceLocator.GetAudio().PlaySound(activeAudioDot.name);
            }
        }

        if (commandTextSpeedMultiplier == 1 && sentence.textSpeedMultiplier != 0)
        {
            commandTextSpeedMultiplier = sentence.textSpeedMultiplier;
        }

        switch (sentence.wordingStyle)
        {
        case SentenceV2.WordingStyle.standard:
            break;

        case SentenceV2.WordingStyle.fullWords:
            displayFullWordAtTheTime = true;
            break;

        case SentenceV2.WordingStyle.fullSentence:
            displayFullSentence = true;
            break;
        }

        lockPlayerInputForRestOfSentence = sentence.lockInput;

        //if (characterData != null)
        //{
        //    if (sentence.characterAvatar != null)
        //    {
        //        Debug.Log("Set to sentence avatar");
        //        AvatarUIObject.sprite = sentence.characterAvatar;
        //    }
        //    else if (characterData.characterAvatar != null)
        //    {
        //        Debug.Log("Set to character avatar");
        //        AvatarUIObject.sprite = characterData.characterAvatar;
        //    }
        //    if (characterData.characterName != null)
        //    {
        //        NPCNameUIObject.text = characterData.characterName;
        //    }
        //    if (characterData.characterAudioDot != null)
        //    {
        //        dotSoundAudioSource.clip = characterData.characterAudioDot;
        //    }
        //}
    }