示例#1
0
    void OnTriggerEnter(Collider other)
    {
        if (other.tag == "Player")
        {
            if(Loop)
            {
                if(Audio == null)
                {
                    Debug.Log(ClipName);
                    SoundManager.Instance.PlaySound(Resources.Load("Audio/" + ClipName) as AudioClip, Loop, transform);
                    Audio = SoundManager.Instance.GetAudioPoint(ClipName, transform);
                }else if(!Audio.Audio.isPlaying)
                {
                    Debug.Log(ClipName + " se continua en " + Audio.Audio.time);
                    SoundManager.Instance.UnPauseIt(Audio.Audio);

                }

            }else{

                Debug.Log(ClipName);
                SoundManager.Instance.PlaySound(Resources.Load("Audio/" + ClipName) as AudioClip, Loop, transform);
            }
        }
    }
示例#2
0
 public bool TryGetObject(out AudioPoint obj)
 {
     obj = GetObject();
     return(obj != null);
 }