Esempio n. 1
0
 private void UnsubscribeToICallAnimateEvents(ICallAudioEvents reference)
 {
     if (reference != null)
     {
         reference.PlayAudio -= CallAudio;
     }
 }
Esempio n. 2
0
    private void Start()
    {
        if (referenceObject != null)
        {
            reference = referenceObject.GetComponent <ICallAudioEvents>();
            SubscribeToICallAnimateEvents(reference);
        }

        foreach (Sound s in sounds)
        {
            s.source        = gameObject.AddComponent <AudioSource>();
            s.source.clip   = s.clip;
            s.source.volume = s.volume;
            s.source.pitch  = s.pitch;
            s.source.loop   = s.loop;
        }
    }
Esempio n. 3
0
 private void Awake()
 {
     reference = GetComponent <ICallAudioEvents>();
 }