[O] Make HideMask separate component
Build AquaMai / build (SDEZ) (push) Has been cancelled Details
Build AquaMai / build (SDGA145) (push) Has been cancelled Details

pull/55/head
Clansty 2024-10-02 19:03:30 +08:00
parent 1bcb7210c6
commit bae5a7c838
No known key found for this signature in database
GPG Key ID: 3A6BE8BAF2EDE134
6 changed files with 22 additions and 5 deletions

View File

@ -336,6 +336,7 @@ DEBUG</DefineConstants>
<Compile Include="UX\CustomVersionString.cs" />
<Compile Include="UX\DemoMaster.cs" />
<Compile Include="UX\ExtendTimer.cs" />
<Compile Include="UX\HideMask.cs" />
<Compile Include="UX\HideSelfMadeCharts.cs" />
<Compile Include="UX\ImmediateSave.cs" />
<Compile Include="UX\LoadAssetsPng.cs" />

View File

@ -14,6 +14,8 @@ UnlockUtage=true
[UX]
# Single player: Show 1P only, at the center of the screen
SinglePlayer=true
# Remove the circle mask in the game
HideMask=true
# Set the version string displayed at the top-right corner of the screen
CustomVersionString=""
# Deprecated: Use `LoadAssetsPng` instead

View File

@ -17,6 +17,8 @@ UnlockUtage=true
[UX]
# 单人模式,不显示 2P
SinglePlayer=true
# 移除遮罩
HideMask=true
# 把右上角的版本更改为自定义文本
CustomVersionString=""
# 已弃用,请使用 LoadAssetsPng

View File

@ -26,6 +26,7 @@ namespace AquaMai
{
public string Locale { get; set; }
public bool SinglePlayer { get; set; }
public bool HideMask { get; set; }
public bool LoadAssetsPng { get; set; }
public bool LoadJacketPng { get; set; }
public bool LoadAssetBundleWithoutManifest { get; set; }

View File

@ -0,0 +1,14 @@
using HarmonyLib;
using UnityEngine;
namespace AquaMai.UX;
public class HideMask
{
[HarmonyPrefix]
[HarmonyPatch(typeof(Main.GameMain), "LateInitialize", typeof(MonoBehaviour), typeof(Transform), typeof(Transform))]
public static void LateInitialize(MonoBehaviour gameMainObject)
{
GameObject.Find("Mask").SetActive(false);
}
}

View File

@ -16,13 +16,10 @@ namespace AquaMai.UX
{
[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)
public static void 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]
@ -55,4 +52,4 @@ namespace AquaMai.UX
return false;
}
}
}
}