Skip to content

Commit

Permalink
feat: DisplayBreakScore option
Browse files Browse the repository at this point in the history
  • Loading branch information
LeZi9916 committed Oct 26, 2024
1 parent 3ffdbe7 commit 80db813
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 5 deletions.
13 changes: 10 additions & 3 deletions Assets/Script/Game/EffectDisplayers/JudgeTextDisplayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,20 @@ public Vector3 LocalPosition
Sprite greatSprite;
Sprite goodSprite;
Sprite missSprite;

bool _displayBreakScore = false;
void Start()
{
var skin = MajInstances.SkinManager.GetJudgeTextSkin();
_displayBreakScore = MajInstances.Setting.Display.DisplayBreakScore;

if(MajInstances.Setting.Display.DisplayCriticalPerfect)
if (MajInstances.Setting.Display.DisplayCriticalPerfect)
{
//breakSprite = skin.CP_Break;
breakSprite = skin.Break_2600_Shine;
if (_displayBreakScore)
breakSprite = skin.Break_2600_Shine;
else
breakSprite = skin.CP_Break;
cPerfectSprite = skin.CriticalPerfect;
}
else
Expand All @@ -53,6 +59,7 @@ void Start()
greatSprite = skin.Great;
goodSprite = skin.Good;
missSprite = skin.Miss;

}
public void Reset()
{
Expand All @@ -64,7 +71,7 @@ public void Play(in JudgeResult judgeResult)
var isBreak = judgeResult.IsBreak;
var result = judgeResult.Result;

if (isBreak)
if (isBreak && _displayBreakScore)
LoadBreakSkin(judgeResult);
else
LoadTapSkin(judgeResult);
Expand Down
3 changes: 2 additions & 1 deletion Assets/Script/Misc/Types/DataFormats/GameSetting.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System.Collections.Generic;

#nullable enable
namespace MajdataPlay.Types
{
public class GameSetting
Expand Down Expand Up @@ -33,6 +33,7 @@ public class DisplayOptions
{
public string Skin { get; set; } = "default";
public bool DisplayCriticalPerfect { get; set; } = false;
public bool DisplayBreakScore { get; set; } = true;
public JudgeDisplayType FastLateType { get; set; } = JudgeDisplayType.Disable;
public JudgeDisplayType NoteJudgeType { get; set; } = JudgeDisplayType.All;
public JudgeDisplayType TouchJudgeType { get; set; } = JudgeDisplayType.All;
Expand Down
2 changes: 2 additions & 0 deletions Assets/Script/Misc/Types/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ public enum MajText
NOTE_SKIN_DESC,
DISPLAY_CRITICAL_PERFECT,
DISPLAY_CRITICAL_PERFECT_DESC,
DISPLAY_BREAK_SCORE,
DISPLAY_BREAK_SCORE_DESC,
FAST_LATE_TYPE,
FAST_LATE_TYPE_DESC,
NOTE_JUDGE_TYPE,
Expand Down
2 changes: 1 addition & 1 deletion Assets/Script/Misc/Types/LangTable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace MajdataPlay.Types
{
public class LangTable
{
public MajText? Type { get; set; } = null;
public MajText Type { get; set; } = MajText.OTHER_MAJTEXT;
public string Origin { get; set; } = string.Empty;
public string Content { get; set; } = string.Empty;
}
Expand Down
10 changes: 10 additions & 0 deletions Assets/StreamingAssets/Langs/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,16 @@
"Origin": "DisplayCriticalPerfect_MAJSETTING_DESC",
"Content": ""
},
{
"Type": "DISPLAY_BREAK_SCORE",
"Origin": "DisplayBreakScore",
"Content": "DisplayBreakScore"
},
{
"Type": "DISPLAY_BREAK_SCORE_DESC",
"Origin": "DisplayBreakScore_MAJSETTING_DESC",
"Content": "DisplayBreakScore_MAJSETTING_DESC"
},
{
"Type": "FAST_LATE_TYPE",
"Origin": "FastLateType",
Expand Down
10 changes: 10 additions & 0 deletions Assets/StreamingAssets/Langs/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,16 @@
"Origin": "DisplayCriticalPerfect_MAJSETTING_DESC",
"Content": "开启后,将会显示Critical判定"
},
{
"Type": "DISPLAY_BREAK_SCORE",
"Origin": "DisplayBreakScore",
"Content": "显示Break分数"
},
{
"Type": "DISPLAY_BREAK_SCORE_DESC",
"Origin": "DisplayBreakScore_MAJSETTING_DESC",
"Content": "开启后,会显示Break类Note的详细得分"
},
{
"Type": "FAST_LATE_TYPE",
"Origin": "FastLateType",
Expand Down

0 comments on commit 80db813

Please sign in to comment.