/// <summary> /// Update heartbeat value (and manage test function) /// </summary> void Update() { //test graph renderer behaviour /*if (!testing) * { * testing = true; * StartCoroutine(test()); * Debug.Log("new test"); * }*/ m_Heart.AddValue(GetBeat()); //this comment counts frames per sec.... some issues here. this update is only called 10 times per sec // (might be hardware related...) //Debug.Log("heart update: " + (int)Time.time); }
// Update is called once per frame void Update() { if (currentTimer > 0.1f) { graph.AddValue(Random.Range(-100, 100)); currentTimer = 0f; } else { currentTimer += Time.deltaTime; } if (Input.GetKeyDown(KeyCode.A)) { graph.SetManualAdjust(new Vector2(-1, 1)); Debug.Log("Set"); } }