-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[+] Slide code support & split multiple patches (#77)
* 功能拆分 将不同的功能分拆到不同文件 * Slide code notation support This is part of Maimai DX 2077 patch set. New MA2 commands: NMSSS, BRSSS, EXSSS, BXSSS, CNSSS
- Loading branch information
Showing
21 changed files
with
2,078 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using HarmonyLib; | ||
using Monitor; | ||
using UnityEngine; | ||
|
||
namespace AquaMai.Fix; | ||
|
||
public class BreakSlideJudgeBlink | ||
{ | ||
/* | ||
* 这个 Patch 让 BreakSlide 的 Critical 判定也可以像 BreakTap 一样闪烁 | ||
* 推荐与自定义皮肤一起使用 (否则视觉效果可能并不好) | ||
*/ | ||
[HarmonyPostfix] | ||
[HarmonyPatch(typeof(SlideJudge), "UpdateBreakEffectAdd")] | ||
private static void FixBreakSlideJudgeBlink( | ||
SpriteRenderer ___SpriteRenderAdd, SpriteRenderer ___SpriteRender, | ||
SlideJudge.SlideJudgeType ____judgeType, SlideJudge.SlideAngle ____angle | ||
) | ||
{ | ||
if (!___SpriteRenderAdd.gameObject.activeSelf) return; | ||
float num = ___SpriteRenderAdd.color.r; | ||
___SpriteRenderAdd.color = new Color(num, num, num, 1f); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using HarmonyLib; | ||
using Monitor; | ||
|
||
namespace AquaMai.Fix; | ||
|
||
public class FanJudgeFlip | ||
{ | ||
/* | ||
* 这个 Patch 让 Wifi Slide 的判定显示有上下的区别 (原本所有 Wifi 的判定显示都是朝向圆心的), 就像 majdata 里那样 | ||
* 这个 bug 产生的原因是 SBGA 忘记给 Wifi 的 EndButtonId 赋值了 | ||
* 不过需要注意的是, 考虑到圆弧形 Slide 的判定显示就是永远朝向圆心的, 我个人会觉得这个 Patch 关掉更好看一点 | ||
*/ | ||
[HarmonyPostfix] | ||
[HarmonyPatch(typeof(SlideFan), "Initialize")] | ||
private static void FixFanJudgeFilp( | ||
int[] ___GoalButtonId, SlideJudge ___JudgeObj | ||
) | ||
{ | ||
if (null != ___JudgeObj) | ||
{ | ||
if (2 <= ___GoalButtonId[1] && ___GoalButtonId[1] <= 5) | ||
{ | ||
___JudgeObj.Flip(false); | ||
___JudgeObj.transform.Rotate(0.0f, 0.0f, 180f); | ||
} | ||
else | ||
{ | ||
___JudgeObj.Flip(true); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
using System; | ||
using HarmonyLib; | ||
using Manager; | ||
using Monitor; | ||
using Process; | ||
using UnityEngine; | ||
|
||
namespace AquaMai.Fix; | ||
|
||
public class FixCircleSlideJudge | ||
{ | ||
/* | ||
* 这个 Patch 让圆弧形的 Slide 的判定显示与判定线精确对齐 (原本会有一点歪), 就像 majdata 里那样 | ||
* 我觉得这个 Patch 算是无副作用的, 可以默认开启 | ||
*/ | ||
[HarmonyPostfix] | ||
[HarmonyPatch(typeof(SlideRoot), "Initialize")] | ||
private static void FixJudgePosition( | ||
SlideRoot __instance, SlideType ___EndSlideType, SlideJudge ___JudgeObj | ||
) | ||
{ | ||
if (null != ___JudgeObj) | ||
{ | ||
float z = ___JudgeObj.transform.localPosition.z; | ||
if (___EndSlideType == SlideType.Slide_Circle_L) | ||
{ | ||
float angle = -45.0f - 45.0f * __instance.EndButtonId; | ||
double angleRad = Math.PI / 180.0 * (angle + 90 + 22.5 + 2.6415); | ||
___JudgeObj.transform.localPosition = new Vector3(480f * (float)Math.Cos(angleRad), 480f * (float)Math.Sin(angleRad), z); | ||
___JudgeObj.transform.localRotation = Quaternion.Euler(0.0f, 0.0f, angle); | ||
} | ||
else if (___EndSlideType == SlideType.Slide_Circle_R) | ||
{ | ||
float angle = -45.0f * __instance.EndButtonId; | ||
double angleRad = Math.PI / 180.0 * (angle + 90 - 22.5 - 2.6415); | ||
___JudgeObj.transform.localPosition = new Vector3(480f * (float)Math.Cos(angleRad), 480f * (float)Math.Sin(angleRad), z); | ||
___JudgeObj.transform.localRotation = Quaternion.Euler(0.0f, 0.0f, angle); | ||
} | ||
} | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Oops, something went wrong.