void Start()
 {
     m_musicFeedback = GameObject.FindGameObjectWithTag("MusicFeedback").GetComponent<MusicFeedback>();
     _id = System.Guid.NewGuid().ToString("N");
     if(m_musicFeedback != null)
         m_musicFeedback.AddShape(GetComponent<Shape>(), _id, _intensity, _randomness);
 }
Ejemplo n.º 2
0
    void Awake()
    {
        if(_instance != null)
        {
            Destroy(gameObject);
            return;
        }

        DontDestroyOnLoad(gameObject);
        _instance = this;

        m_audioSource = GetComponent<AudioSource>();
    }
 void Start()
 {
     m_resolution = new Vector2(Camera.main.pixelWidth, Camera.main.pixelHeight);
     m_feedback = GameObject.FindWithTag("MusicFeedback").GetComponent<MusicFeedback>();
 }