private int GetDoubleJumpScore() { int noDoubleJumps = playerJump.GetNoDoubleJumps(); float doubleJumpScore = (defaultScore / ((doubleJumpScoreModifierLog * noDoubleJumps) + doubleJumpScoreModifierLog)) + (doubleJumpScoreModifierConst * noDoubleJumps); return((int)Mathf.Ceil(doubleJumpScore)); }
private void Update() { string statsString = "Stats"; statsString += "\n"; statsString += statStringFormat("Jumps", playerJump.GetNoJumps(), PlayerStats.TotalJumps); statsString += statStringFormat("Double Jumps", playerJump.GetNoDoubleJumps(), PlayerStats.TotalDoubleJumps); statsString += statStringFormat("Fails", cubeFail.GetNoFails(), PlayerStats.TotalFails); statsString += statStringFormat("Score", scoreCalculator.GetLevelScore(), PlayerStats.TotalScore); statsText.text = statsString; }
public void CompleteLevel() { // TODO: Remove all Debug-Log, this is integrated in InGameUI instead Debug.Log("You won!"); PlayerStats.TotalScore += scoreCalculator.GetLevelScore(); Debug.Log("Your total score: " + PlayerStats.TotalScore); Debug.Log("Your score on this level: " + scoreCalculator.GetLevelScore()); PlayerStats.TotalJumps += playerJump.GetNoJumps(); Debug.Log("Your total Number of Jumps: " + PlayerStats.TotalJumps); Debug.Log("Your number of Jumps on this level: " + playerJump.GetNoJumps()); PlayerStats.TotalDoubleJumps += playerJump.GetNoDoubleJumps(); Debug.Log("Your total Number of Double Jumps: " + PlayerStats.TotalDoubleJumps); Debug.Log("Your number of Double Jumps on this level: " + playerJump.GetNoDoubleJumps()); PlayerStats.TotalFails += playerFail.GetNoFails(); Debug.Log("Your total fails: " + PlayerStats.TotalFails); Debug.Log("Your fails on this level: " + playerFail.GetNoFails()); completeLevelUi.SetActive(true); }