Commit 8343537b authored by hewenhao's avatar hewenhao

feat: update

parent e9923bea
......@@ -27,6 +27,22 @@ const getLevelBigBg = (s?: StageLevel | null): string => {
return assets['level-big-fail.png'].u
}
const getWeight = (s?: StageLevel | null) => {
switch (s) {
case StageLevel.S: {
return 100
}
case StageLevel.A: {
return 50
}
case StageLevel.B: {
return 25
}
}
return 0
}
const getAudioSrc = (s?: StageLevel | null) => {
if (!s) {
return audio['闯关失败.wav'].u
......@@ -111,7 +127,7 @@ const GameCompleteHead = () => {
const text = useMemo(() => {
const { text: _text, second, color } = getLevelText(gameResult?.level)
if (gameResult?.levelBefore !== gameResult?.level) {
if (getWeight(gameResult?.levelBefore) < getWeight(gameResult?.level)) {
return { text: second, color }
}
return { text: _text, color }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment