Skip to content

Commit cbf2680

Browse files
committed
[O] Change color
1 parent dc91896 commit cbf2680

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

AquaMai.Mods/Utils/UnstableRate.cs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ private struct Timing
5959

6060
private static readonly Timing[] Timings =
6161
[
62-
new() { windowStart = 0, windowEnd = 1, color = new Color(0.133f, 0.712f, 0.851f) }, // Critical
63-
new() { windowStart = 1, windowEnd = 3, color = new Color(0.122f, 0.484f, 0.861f) }, // Perfect
64-
new() { windowStart = 3, windowEnd = 6, color = new Color(0.102f, 0.731f, 0.078f) }, // Great
65-
new() { windowStart = 6, windowEnd = 9, color = new Color(0.925f, 0.730f, 0.110f) }, // Good
62+
new() { windowStart = 0, windowEnd = 1, color = new Color(1.000f, 0.843f, 0.000f) }, // Critical (#ffd700)
63+
new() { windowStart = 1, windowEnd = 3, color = new Color(1.000f, 0.647f, 0.000f) }, // Perfect (#ffa500)
64+
new() { windowStart = 3, windowEnd = 6, color = new Color(1.000f, 0.078f, 0.576f) }, // Great (#ff1493)
65+
new() { windowStart = 6, windowEnd = 9, color = new Color(0.000f, 0.502f, 0.000f) }, // Good (#008000)
6666
];
6767
private static readonly Timing Miss = new() { windowStart = 999, windowEnd = 999, color = Color.grey };
6868
private static readonly Material LineMaterial = new(Shader.Find("Sprites/Default"));
@@ -78,6 +78,8 @@ public static void OnGameProcessStart(GameProcess __instance, GameMonitor[] ____
7878
for (int i = 0; i < 2; i++)
7979
{
8080
if (displayType[i] == 0) continue;
81+
var userData = UserDataManager.Instance.GetUserData(i);
82+
if (!userData.IsEntry) continue;
8183
var main = ____monitors[i].gameObject.transform.Find("Canvas/Main");
8284
var go = new GameObject("[AquaMai] UnstableRate");
8385
go.transform.SetParent(main, false);
@@ -112,7 +114,7 @@ public static void OnJudge(NoteBase __instance, float ___JudgeTimingDiffMsec)
112114
{
113115
return;
114116
}
115-
117+
116118
var line = pool.Get();
117119

118120
line.SetPosition(0, new Vector3(BaselineCenter + BaselineHScale * (msec / TimingBin), BaselineHeight + JudgeHeight, 0));
@@ -215,7 +217,7 @@ private class LinePool
215217
public LinePool(GameObject parent)
216218
{
217219
_parent = parent;
218-
220+
219221
// 预创建对象
220222
for (int i = 0; i < InitialPoolSize; i++)
221223
{
@@ -237,7 +239,7 @@ public LineRenderer Get()
237239
{
238240
line = CreateLine(_parent);
239241
}
240-
242+
241243
return line;
242244
}
243245

@@ -278,7 +280,7 @@ public void Update()
278280
return;
279281

280282
var fadeProgress = (_elapsedTime - JudgeFadeDelay) / JudgeFadeTime;
281-
283+
282284
if (fadeProgress >= 1.0f)
283285
{
284286
_pool.Return(_line);

0 commit comments

Comments
 (0)