== to ===

This commit is contained in:
2025-05-28 19:15:32 +08:00
parent ccfcc4f840
commit 34eec38036
16 changed files with 64 additions and 64 deletions

View File

@@ -17,15 +17,15 @@ export function Utility_ConvertSecondToString(second: number) {
export function Utility_CalculateScore(difficulty: string, second: number): number {
let score = 0
const currentTime = Math.min(120, second)
if (difficulty == config.DIFFICULTY_TYPE.Easy) {
if (difficulty === config.DIFFICULTY_TYPE.Easy) {
score = 270 - currentTime
} else if (difficulty == config.DIFFICULTY_TYPE.Medium) {
} else if (difficulty === config.DIFFICULTY_TYPE.Medium) {
score = 420 - currentTime * 2
} else if (difficulty == config.DIFFICULTY_TYPE.Hard) {
} else if (difficulty === config.DIFFICULTY_TYPE.Hard) {
score = 760 - currentTime * 3
} else if (difficulty == config.DIFFICULTY_TYPE.Expert) {
} else if (difficulty === config.DIFFICULTY_TYPE.Expert) {
score = 1120 - currentTime * 3
} else if (difficulty == config.DIFFICULTY_TYPE.Extreme) {
} else if (difficulty === config.DIFFICULTY_TYPE.Extreme) {
score = 1320 - currentTime * 4
}
// console.log("计算积分 >>>>>", difficulty, second, score)