コード例 #1
0
ファイル: VillagerScript.cs プロジェクト: YaLuTi/Party
 void Start()
 {
     dialogueAudio = GetComponent <DialogueAudio>();
     animator      = GetComponent <Animator>();
     animatedText  = InterfaceManager.instance.animatedText;
     animatedText.onEmotionChange.AddListener((newEmotion) => EmotionChanger(newEmotion));
     animatedText.onAction.AddListener((action) => SetAction(action));
 }
コード例 #2
0
    private void Start()
    {
        mainCamera    = GameObject.Find("Main Camera").GetComponent <Camera>();
        dialogueAudio = GetComponent <DialogueAudio>();

        // 스크립트에 할당된 Particle 오브젝트를 딕셔너리에 추가
        for (int i = 0; i < Particles.Length; i++)
        {
            EmotionParticles.Add(Particles[i].name, Particles[i].GetComponent <ParticleSystem>());
        }

        animator     = GetComponent <Animator>();
        animatedText = InterfaceManager.instance.animatedText;
        animatedText.onAction.AddListener((action) => SetAction(action));
        animatedText.onEmotionChange.AddListener((newEmotion) => EmotionChanger(newEmotion));
    }
コード例 #3
0
    void Start()
    {
        // Setting up audio sources
        soundComponent                   = GetComponent <DialogueAudio>();
        soundComponent.voiceSource       = GetComponents <AudioSource>()[0];
        soundComponent.punctuationSource = GetComponents <AudioSource>()[1];

        // Disabling icons and box
        setIcon(-1);
        arrow.SetActive(false);

        conversationIndex = 0;
        //dialogueIndex = 0;
        conversation = story[dialogueIndex].getConversation();
        speaker      = story[dialogueIndex].getSpeaker();
        updateDialogue();
    }