Ejemplo n.º 1
0
    IEnumerator ChangeScale()
    {
        m_ScaleBool = false;

        if (m_Crowd)
        {
            m_Sacle = m_Crowd.GetMicLoudness();
            m_Sacle = 1 + m_Sacle * 1.0f;
            transform.localScale = new Vector3(m_Sacle, m_Sacle);
        }

        yield return(new WaitForSeconds(0.5f));

        m_ScaleBool = true;
    }
Ejemplo n.º 2
0
    void runAround()
    {
        //  if (m_Crowd.GetMicLoudness()>=1.0f)
        //{
        //    m_EnergyLevel += m_LevelDelta;
        //}
        m_EnergyLevel += m_Crowd.GetMicLoudness();

        //if (m_Crowd.GetMicLoudness() <= 0.5f)
        //{
        //    m_Level -= m_LevelDelta;
        //    if (m_Level <= 0)
        //        m_Level = 0;
        //}


        m_EnergyDeltaTime += Time.deltaTime * m_EnergyLevel;

        m_X = m_Radius * Mathf.Cos(m_EnergyDeltaTime);
        m_Z = m_Radius * Mathf.Sin(m_EnergyDeltaTime);
        transform.position = new Vector3(m_X, transform.position.y, m_Z);
    }