Beispiel #1
0
    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();
    }
Beispiel #2
0
    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();
    }