forked from octoberU/ScoreOverlay
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Updater.cs
50 lines (39 loc) · 1.14 KB
/
Updater.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using Harmony;
using MelonLoader;
using System;
using System.Globalization;
namespace ScoreOverlay
{
internal static class Updater
{
[HarmonyPatch(typeof(AudioDriver), "StartPlaying", new Type[0])]
private static class ScoreUpdater
{
private static void Postfix(AudioDriver __instance)
{
if (UI.loaded)
{
ScoreOverlayMod.ResetTracker();
UI.FadeInOverlay();
UI.UpdateUiInfo(SongDataHolder.I.songData);
}
}
}
[HarmonyPatch(typeof(InGameUI), "ReturnToSongList", new Type[0])]
private static class ReturnToSongList
{
private static void Postfix(InGameUI __instance)
{
UI.FadeOutOverlay();
}
}
[HarmonyPatch(typeof(InGameUI), "Restart", new Type[0])]
private static class Restart
{
private static void Postfix(InGameUI __instance)
{
UI.FadeOutOverlay();
}
}
}
}