public static void AddHoldPoints(float timeToBegin, float timeStarted, float durationToHold, float currentTime) { float prc = Mathf.Clamp((currentTime - timeStarted) / durationToHold, 0, 1); float maxPoints = durationToHold * Config.STREAK_MULTIPLIER; if (prc < 1) { currentScore += Config.STREAK_MULTIPLIER * (Mathf.CeilToInt(prc * maxPoints)); UIEventManager.ScoreChangedEvent(); } }
public static void ResetScore() { currentScore = 0; UIEventManager.ScoreChangedEvent(); lastOrderIndex = 0; ResetStreak(); UIEventManager.StreakChangedEvent(); perfectCount = 0; nonPerfectCount = 0; missCount = 0; UIEventManager.PerfectTapCountChangedEvent(); UIEventManager.NonPerfectTapCountChangedEvent(); UIEventManager.MissWordCountChangedEvent(); }
private static void AddScore(float hitTime, float wordTime, bool isPerfect) { if (isPerfect) { currentScore += Config.POINT_VALUE; perfectCount++; UIEventManager.PerfectTapCountChangedEvent(); } else { currentScore += Config.POINT_VALUE / 2; nonPerfectCount++; UIEventManager.NonPerfectTapCountChangedEvent(); } // ADD STREAK BONUS currentScore += streak * Config.STREAK_MULTIPLIER; UIEventManager.ScoreChangedEvent(); }
public static void FakeClick() { currentScore -= Config.FAKE_WORD_PENALTY; UIEventManager.ScoreChangedEvent(); }