예제 #1
0
 // Update is called once per frame
 private void Update()
 {
     transform.Find("SelectButton").GetComponent <Button>().interactable =
         AudioTextLoader.GetSelectedDescription(GameObject.Find("DescriptionsMenu(Clone)")
                                                .GetComponent <SoundDescriptionsMenu>().Clip.Name) !=
         transform.Find("DescriptionField").GetComponent <InputField>().text;
 }
예제 #2
0
    private void PlayClip(NamedAudioClip clip, Vector3 position, float minVolume, float maxVolume,
                          float minPitch, float maxPitch)
    {
        transform.position = position;

        _source.clip   = clip.Clip;
        _source.volume = Random.Range(minVolume, maxVolume);
        _source.pitch  = Random.Range(minPitch, maxPitch);
        _started       = true;
        _source.Play();

        ShowText(AudioTextLoader.GetSelectedDescription(clip.Name), position, clip.Clip.length);
    }
예제 #3
0
 private void UpdateUi()
 {
     transform.Find("Name").GetComponent <Text>().text    = Clip.Name;
     transform.Find("Current").GetComponent <Text>().text = AudioTextLoader.GetSelectedDescription(Clip.Name);
 }