void Start() { dialogueAudio = GetComponent <DialogueAudio>(); animator = GetComponent <Animator>(); animatedText = InterfaceManager.instance.animatedText; animatedText.onEmotionChange.AddListener((newEmotion) => EmotionChanger(newEmotion)); animatedText.onAction.AddListener((action) => SetAction(action)); }
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)); }
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(); }