} // on default is empty // TODO: clean this up this function sucks // spawns rating texts and adds to charisma when player presses a dance key // EFFECT: adds to characterHealth charisma, changes ResultsManager fields protected void EvaluateScore(float _score) { ResultsManager.IncTotalDanceTiles(); if (_score > 9.2) { SpawnScoreText(perfectText); // spawn perfect text perfectInARow++; if (perfectInARow > 1) // if over 1 perfect in a row { this.SpawnPerfectMultiplierText(); } characterHealth.AddCharisma(10f); FindObjectOfType <AudioManager>().Play("metronome"); ResultsManager.IncPerfectTiles(); } else if (_score > 8.9) { perfectInARow = 0; characterHealth.AddCharisma(3f); SpawnScoreText(goodText); // spawn good text FindObjectOfType <AudioManager>().Play("metronome"); ResultsManager.IncGoodTiles(); } else if (_score > 8.5) { perfectInARow = 0; if (characterHealth.charisma > 50f) { characterHealth.AddCharisma(-5f); // "okay" rating will only penalize if at high-charisma FindObjectOfType <AudioManager>().Play("metronome"); } else { characterHealth.AddCharisma(3f); FindObjectOfType <AudioManager>().Play("metronome"); } FindObjectOfType <AudioManager>().Play("metronome"); SpawnScoreText(okText); // spawn ok text ResultsManager.IncOkTiles(); } else { perfectInARow = 0; characterHealth.AddCharisma(-10f); SpawnScoreText(missedText); // spawn missed text pop up FindObjectOfType <AudioManager>().Play("negative"); ResultsManager.IncMissedDanceTiles(); } }