Ejemplo n.º 1
0
    public void Awake()
    {
        sineScript        = this.GetComponent <SineController>();
        samplingFrequency = AudioSettings.outputSampleRate;
        print("Audio Sample Rate: " + samplingFrequency);

        waves    = new Wave[sineScript.maxParents];
        waves[0] = new Wave(sineScript.getFrequency(),
                            sineScript.getAmplitude(),
                            0f,
                            samplingFrequency);
        waveCount = 1;

        if (SceneManager.GetActiveScene().name == "Learn2D")
        {
            inLearn2D  = true;
            leftScale  = 1f;
            rightScale = 1f;
        }
        else
        {
            inLearn2D = false;
        }

        camera = GameObject.Find("ARCamera");
    }
Ejemplo n.º 2
0
    public void SetText()
    {
        float num = Mathf.Round(sineScript.getAmplitude() * 100) / 100f;

        Anum.GetComponent <TextMesh>().text = num.ToString();
    }