feat(huoshan): 统一愤怒红并改屏幕Bloom提亮
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -51,7 +51,7 @@ namespace AibisDream.MiniGame.Language
|
||||
|
||||
[Header("聚焦干扰")]
|
||||
[Range(0f, 1f)] public float focusInterferenceProgress = 0f;
|
||||
public Color focusInterferenceColor = new Color(1f, 0.2392157f, 0.3215686f, 1f);
|
||||
public Color focusInterferenceColor = new Color(1f, 0.1882353f, 0.3019608f, 1f); // #FF304D
|
||||
public float focusInterferenceShakeAmplitude = 0.16f;
|
||||
public float focusInterferenceShakeSpeed = 24f;
|
||||
private bool focusInterferenceUsesMarquee;
|
||||
@@ -61,7 +61,7 @@ namespace AibisDream.MiniGame.Language
|
||||
|
||||
// 颜色配置(由Manager设置)
|
||||
private Color targetColor = new Color(1f, 0.39f, 0.39f, 1f); // 目标粒子颜色
|
||||
private Color nonTargetColor = new Color(0.2f, 0.78f, 1f, 1f); // 非目标粒子颜色
|
||||
private Color nonTargetColor = new Color(1f, 0.1882353f, 0.3019608f, 1f); // 非目标粒子固定红色 #FF304D
|
||||
private Color propagationColor = new Color(1f, 0.59f, 0.2f, 1f); // 传播颜色
|
||||
private Color calmColor = new Color(0.3607843f, 0.945098f, 0.8156863f, 1f); // 最终目标色 #5CF1D0
|
||||
private Color[] nonTargetMarqueeColors;
|
||||
@@ -219,7 +219,7 @@ namespace AibisDream.MiniGame.Language
|
||||
}
|
||||
else
|
||||
{
|
||||
// 笑话/逃避文字使用统一时钟驱动的固定色板走马灯;只循环,不随机。
|
||||
// 笑话、逃避与愤怒在屏幕粒子中统一使用固定红色。
|
||||
Color marqueeColor = GetNonTargetMarqueeColor();
|
||||
color = new Color(marqueeColor.r, marqueeColor.g, marqueeColor.b, displayAlpha);
|
||||
}
|
||||
|
||||
@@ -30,8 +30,8 @@ namespace AibisDream
|
||||
[SerializeField] private SpriteRenderer screenOverlayRenderer;
|
||||
[SerializeField] private SpriteRenderer volcanoOverlayRenderer;
|
||||
[SerializeField, Range(0f, 1f)] private float spriteOverlayFadeInAlpha = 1f;
|
||||
[Tooltip("屏幕强制保持该 RGB(只动 alpha)")]
|
||||
[SerializeField] private Color lockedScreenRgb = Color.black;
|
||||
[Tooltip("屏幕淡入时的亮度倍率。大于 1 的部分由 Bloom 提取,Sprite 原本的绿色保持不变。")]
|
||||
[SerializeField, Min(1f)] private float screenBloomBrightness = 1.35f;
|
||||
|
||||
[Header("Glitch 噪波效果")]
|
||||
[Tooltip("噪波故障效果控制器,可选;置于 Expression View 子物体上")]
|
||||
@@ -104,6 +104,8 @@ namespace AibisDream
|
||||
/// <param name="nonTargetParticleTotal">非目标候选粒子总数;<0 时使用 Inspector 默认候选池大小</param>
|
||||
public void StartSystem(List<string> anxietyPhrases, string targetSentence, string completionNodeName = null, int nonTargetParticleTotal = -1)
|
||||
{
|
||||
HideSpriteOverlaysForMinigame();
|
||||
|
||||
if (particleManager != null)
|
||||
{
|
||||
particleManager.SetPresentationController(logReleasePresentation);
|
||||
@@ -115,6 +117,31 @@ namespace AibisDream
|
||||
}
|
||||
}
|
||||
|
||||
private void HideSpriteOverlaysForMinigame()
|
||||
{
|
||||
List<SpriteRenderer> renderers = CollectSpriteOverlayRenderers();
|
||||
for (int i = 0; i < renderers.Count; i++)
|
||||
{
|
||||
SpriteRenderer sr = renderers[i];
|
||||
if (sr == null) continue;
|
||||
|
||||
DOTween.Kill(sr);
|
||||
if (IsScreenOverlayRenderer(sr))
|
||||
{
|
||||
LockScreenOverlayRgb(sr, 0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
Color color = sr.color;
|
||||
color.a = 0f;
|
||||
sr.color = color;
|
||||
}
|
||||
|
||||
sr.enabled = false;
|
||||
sr.gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 启动粒子系统(字符串数组版本,方便 Yarn 调用)
|
||||
/// </summary>
|
||||
@@ -348,7 +375,6 @@ namespace AibisDream
|
||||
if (sr == null) return;
|
||||
if (IsScreenOverlayRenderer(sr))
|
||||
{
|
||||
SuppressScreenMaterialGlow(sr);
|
||||
LockScreenOverlayRgb(sr, alpha);
|
||||
return;
|
||||
}
|
||||
@@ -361,22 +387,11 @@ namespace AibisDream
|
||||
private void LockScreenOverlayRgb(SpriteRenderer sr, float alpha)
|
||||
{
|
||||
if (!IsScreenOverlayRenderer(sr)) return;
|
||||
Color locked = lockedScreenRgb;
|
||||
Color locked = Color.white * screenBloomBrightness;
|
||||
locked.a = Mathf.Clamp01(alpha);
|
||||
sr.color = locked;
|
||||
}
|
||||
|
||||
private static void SuppressScreenMaterialGlow(SpriteRenderer sr)
|
||||
{
|
||||
if (sr == null) return;
|
||||
Material mat = sr.material;
|
||||
if (mat == null) return;
|
||||
if (mat.HasProperty("_Glow"))
|
||||
mat.SetFloat("_Glow", 0f);
|
||||
if (mat.HasProperty("_GlowGlobal"))
|
||||
mat.SetFloat("_GlowGlobal", 1f);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Glitch 噪波过渡:从当前强度平滑过渡到 to,不瞬移(类似 DOTween)。
|
||||
/// </summary>
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace AibisDream.MiniGame.Language
|
||||
|
||||
[Header("颜色配置(用于粒子/字的颜色,与目标/非目标解绑,可自由搭配)")]
|
||||
[SerializeField] private Color targetParticleColor = new Color(0.627451f, 1f, 0.8470588f, 1f); // 目标粒子 #A0FFD8
|
||||
[SerializeField] private Color nonTargetParticleColor = new Color(1f, 0.3137255f, 0.4392157f, 1f); // 干扰粒子 #FF5070
|
||||
[SerializeField] private Color nonTargetParticleColor = new Color(1f, 0.1882353f, 0.3019608f, 1f); // 干扰粒子固定红色 #FF304D
|
||||
[SerializeField] private Color floatingTextColor = new Color(0.7f, 0.78f, 1f, 1f); // 背景浮动文字颜色
|
||||
[SerializeField] private Color targetCalmColor = new Color(0.3607843f, 0.945098f, 0.8156863f, 1f); // 聚拢后的固定目标色 #5CF1D0
|
||||
|
||||
@@ -98,10 +98,8 @@ namespace AibisDream.MiniGame.Language
|
||||
[SerializeField, Range(0f, 0.03f)] private float nonTargetFloatAmplitude = 0.015f; // 非目标粒子漂浮幅度
|
||||
[SerializeField] private Color[] nonTargetMarqueeColors =
|
||||
{
|
||||
new Color(1f, 0.3137255f, 0.4392157f, 1f), // #FF5070
|
||||
new Color(1f, 0.7843137f, 0.3411765f, 1f), // #FFC857
|
||||
new Color(0.4f, 0.8509804f, 1f, 1f), // #66D9FF
|
||||
new Color(0.7803922f, 0.4901961f, 1f, 1f) // #C77DFF
|
||||
// 保留单色数组以兼容旧的 "rainbow" 演出参数;屏幕粒子不再循环彩虹色。
|
||||
new Color(1f, 0.1882353f, 0.3019608f, 1f) // #FF304D
|
||||
};
|
||||
[SerializeField, Min(0.02f)] private float nonTargetMarqueeStepDuration = 0.18f;
|
||||
|
||||
@@ -157,7 +155,7 @@ namespace AibisDream.MiniGame.Language
|
||||
[SerializeField] private float shuffleVerticalScale = 0.6f;
|
||||
|
||||
[Header("聚焦干扰表现")]
|
||||
[SerializeField] private Color focusInterferenceColor = new Color(1f, 0.2392157f, 0.3215686f, 1f);
|
||||
[SerializeField] private Color focusInterferenceColor = new Color(1f, 0.1882353f, 0.3019608f, 1f); // #FF304D
|
||||
[SerializeField, Range(0.02f, 0.5f)] private float focusInterferenceShakeAmplitude = 0.16f;
|
||||
[SerializeField, Range(1f, 60f)] private float focusInterferenceShakeSpeed = 24f;
|
||||
[SerializeField, Range(0.02f, 0.5f)] private float focusInterferenceChangeInterval = 0.055f;
|
||||
|
||||
Reference in New Issue
Block a user