2024-10-25 20:42:08 +08:00
|
|
|
|
using HarmonyLib;
|
|
|
|
|
using Monitor;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
2024-10-28 06:09:42 +08:00
|
|
|
|
namespace AquaMai.Visual;
|
2024-10-25 20:42:08 +08:00
|
|
|
|
|
|
|
|
|
public class BreakSlideJudgeBlink
|
|
|
|
|
{
|
|
|
|
|
/*
|
|
|
|
|
* 这个 Patch 让 BreakSlide 的 Critical 判定也可以像 BreakTap 一样闪烁
|
|
|
|
|
* 推荐与自定义皮肤一起使用 (否则视觉效果可能并不好)
|
|
|
|
|
*/
|
|
|
|
|
[HarmonyPostfix]
|
|
|
|
|
[HarmonyPatch(typeof(SlideJudge), "UpdateBreakEffectAdd")]
|
|
|
|
|
private static void FixBreakSlideJudgeBlink(
|
2024-11-06 11:54:53 +08:00
|
|
|
|
SpriteRenderer ___SpriteRenderAdd, int ____addEffectCount
|
2024-10-25 20:42:08 +08:00
|
|
|
|
)
|
|
|
|
|
{
|
|
|
|
|
if (!___SpriteRenderAdd.gameObject.activeSelf) return;
|
2024-11-06 11:54:53 +08:00
|
|
|
|
float num = (____addEffectCount & 0b10) >> 1;
|
2024-10-25 20:42:08 +08:00
|
|
|
|
___SpriteRenderAdd.color = new Color(num, num, num, 1f);
|
|
|
|
|
}
|
2024-10-28 06:09:42 +08:00
|
|
|
|
}
|