Skip to content

Commit

Permalink
fix miss event
Browse files Browse the repository at this point in the history
  • Loading branch information
lxymahatma committed May 20, 2023
1 parent a44662f commit 34f7441
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/MelonBuildInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ internal static class MelonBuildInfo

public const string Author = "lxy";

public const string Version = "1.1.5";
public const string Version = "1.1.6";
}
2 changes: 1 addition & 1 deletion src/MuseDashMirror.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
<Compile Include="CommonPatches\ManualPatches.cs" />
<Compile Include="Main.cs" />
<Compile Include="MelonBuildInfo.cs" />
<Compile Include="Patch\GameMissPlayPatch.cs" />
<Compile Include="Patch\MissPatch.cs" />
<Compile Include="Patch\MenuSelectPatch.cs" />
<Compile Include="Patch\PnlVictoryPatch.cs" />
<Compile Include="Patch\PnlMenuPatch.cs" />
Expand Down
4 changes: 3 additions & 1 deletion src/Patch/GameMissPlayPatch.cs → src/Patch/MissPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
namespace MuseDashMirror.Patch;

[HarmonyPatch(typeof(GameMissPlay), "MissCube")]
internal static class GameMissPlayPatch
internal static class MissPatch
{
private static void Postfix(int idx, decimal currentTick)
{
Expand Down Expand Up @@ -85,6 +85,8 @@ private static void Postfix(int idx, byte result, bool isMulStart = false, bool
NormalMissNum++;
TotalMissNum++;
}

MissCubeEventInvoke();
}
}
}
3 changes: 3 additions & 0 deletions src/UICreate/CanvasCreate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

namespace MuseDashMirror.UICreate;

/// <summary>
/// Methods for creating canvas
/// </summary>
public static class CanvasCreate
{
/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions src/UICreate/Colors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

namespace MuseDashMirror.UICreate;

/// <summary>
/// Default colors
/// </summary>
public static class Colors
{
/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions src/UICreate/Fonts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

namespace MuseDashMirror.UICreate;

/// <summary>
/// Default fonts
/// </summary>
public static class Fonts
{
/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions src/UICreate/TextGameObjectCreate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

namespace MuseDashMirror.UICreate;

/// <summary>
/// Methods for creating text GameObject
/// </summary>
public static class TextGameObjectCreate
{
/// <summary>
Expand Down
6 changes: 6 additions & 0 deletions src/UICreate/ToggleCreate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@

namespace MuseDashMirror.UICreate;

/// <summary>
/// Methods for creating toggle
/// </summary>
public static class ToggleCreate
{
/// <summary>
/// Invoked when toggle is clicked
/// </summary>
public static event Action OnToggleClick;

private static void OnToggleClickInvoke(bool val) => OnToggleClick?.Invoke();
Expand Down

0 comments on commit 34f7441

Please sign in to comment.