MeshLinesGenerator.Update C# (CSharp) Method

Update() public method

public Update ( ) : void
return void
    void Update()
    {
        var inputDevice = InputManager.ActiveDevice;
        if(inputDevice.Action2.WasPressed)
        {
            isAmplitudeScale = !isAmplitudeScale;
        }

        UpdateCollumnVerticesPosition();

        spawnCooldownCounter += Time.deltaTime;
        if(spawnCooldownCounter > spawnCooldown)
        {
            spawnCooldownCounter -= spawnCooldown;

            Profiler.BeginSample("GenerateLineMesh");
            GenerateLineMesh();
            Profiler.EndSample();

            Profiler.BeginSample("StitchNewRowIntoCollumns");
            StitchNewRowIntoCollumns();
            Profiler.EndSample();

        }

        meshMaterial.color = audioDirector.calculatedRGB;

        meshColorViewer = meshMaterial.color;

        /*
        if (Time.frameCount % 30 == 0)
        {
           System.GC.Collect();
        }
        */
    }