Skip to content

Commit

Permalink
fix: quantif?!!
Browse files Browse the repository at this point in the history
  • Loading branch information
Napolitain committed Jan 9, 2022
1 parent 291530b commit c6730f4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Assets/Scripts/PianoToucheScript.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ void Start()
void Update()
{
// quantification de notes
if (Game.currentTime >= playNote)
if (Game.CurrentTime >= playNote)
{
//Debug.Log(playNote + " " + Game.currentTime);
PlayNote();
}
// release de la touche jusqu'a fin de note (release_time)
if (Game.currentTime >= release)
if (Game.CurrentTime >= release)
{
release_tmp += Time.deltaTime;
audioSource.volume -= Time.deltaTime / RELEASE_TIME;
Expand Down Expand Up @@ -128,14 +128,14 @@ void OnTriggerEnter(Collider collider)
}
}
//if (Game.frame.Hands[a / 5].Fingers[a % 5].IsExtended) // joue le son
{
//{
//Debug.Log("Note " + note.ToString() + " détectée: " + Game.CurrentTime);
Debug.Log(">>>>>>>>>>>>>>>>>>>>>>>>>>>>");
audioSource.volume = Mathf.Max(VOLUME_MIN, VOLUME_MAX * Mathf.Min(VELOCITY_MAX, collider.GetComponent<VelocityFinger>().velocity) / VELOCITY_MAX);
playNote = Game.CurrentTimeQuantized;
Chords.currentChords.Add(note);
ShowClickedNote(true);
}
//}
}
}

Expand Down

0 comments on commit c6730f4

Please sign in to comment.