mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-08 13:57:26 +08:00
@@ -263,6 +263,7 @@
|
|||||||
<Compile Include="CutsceneSkipping.cs" />
|
<Compile Include="CutsceneSkipping.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="Main.cs" />
|
<Compile Include="Main.cs" />
|
||||||
|
<Compile Include="SinglePlayer.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ namespace AquaMai
|
|||||||
{
|
{
|
||||||
MelonLogger.Msg("OnApplicationStart");
|
MelonLogger.Msg("OnApplicationStart");
|
||||||
HarmonyLib.Harmony.CreateAndPatchAll(typeof(CutsceneSkipping));
|
HarmonyLib.Harmony.CreateAndPatchAll(typeof(CutsceneSkipping));
|
||||||
|
HarmonyLib.Harmony.CreateAndPatchAll(typeof(SinglePlayer));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
30
AquaMai/SinglePlayer.cs
Normal file
30
AquaMai/SinglePlayer.cs
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
using System;
|
||||||
|
using HarmonyLib;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace AquaMai {
|
||||||
|
// Hides the 2p (right hand side) UI.
|
||||||
|
// Note: this is not my original work. I simply interpreted the code and rewrote it as a mod.
|
||||||
|
public class SinglePlayer {
|
||||||
|
[HarmonyPrefix]
|
||||||
|
[HarmonyPatch(typeof(Main.GameMain), "LateInitialize", new Type[] { typeof(MonoBehaviour), typeof(Transform), typeof(Transform) })]
|
||||||
|
public static bool LateInitialize(MonoBehaviour gameMainObject, ref Transform left, ref Transform right)
|
||||||
|
{
|
||||||
|
left.transform.position = Vector3.zero;
|
||||||
|
right.localScale = Vector3.zero;
|
||||||
|
GameObject.Find("Mask").SetActive(false);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyPrefix]
|
||||||
|
[HarmonyPatch(typeof(MeshButton), "IsPointInPolygon", new Type[] { typeof(Vector2[]), typeof(Vector2) })]
|
||||||
|
public static bool IsPointInPolygon(Vector2[] polygon, ref Vector2 point)
|
||||||
|
{
|
||||||
|
var screenWidth = Screen.width;
|
||||||
|
point = new Vector2(point.x - (screenWidth / 2), point.y);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user