void Start()
        {
            audioPeer = GameObject.FindObjectOfType(typeof(AudioPeer)) as AudioPeer;

            if (audioPeer == null)
            {
                Debug.LogError("audium peerum null");
            }
            ;

            // this is problematic
            stateFlipped = () =>
            {
                if (isActive == true)
                {
                    OnEffectActivate();
                }
                else
                {
                    OnEffectDeactivate();
                }
            };

            if (startsTriggered)
            {
                isEnabled = true;
            }
        }
Esempio n. 2
0
        void Start()
        {
            _audioSource      = GetComponent <AudioSource>();
            _audioPeer        = GetComponent <AudioPeer>();
            _audioSource.clip = trackProfile.audioClip;
            _audioSource.time = 0f;

            StartCoroutine(PlayDelayed());
        }