71 lines
2.5 KiB
C#
71 lines
2.5 KiB
C#
using System;
|
|
using UnityEngine;
|
|
|
|
namespace AibisDream
|
|
{
|
|
/// <summary>
|
|
/// Central tuning for Peipei eye-module visuals. Edit on EyeManager (EyeSystem).
|
|
/// </summary>
|
|
[Serializable]
|
|
public class EyeVisualSettings
|
|
{
|
|
[Header("Color Reveal")]
|
|
[Tooltip("Unfocused / gray state (0 = gray, 1 = full color).")]
|
|
[Range(0f, 1f)] public float colorRevealMin;
|
|
|
|
[Tooltip("Focused / imagined color state.")]
|
|
[Range(0f, 1f)] public float colorRevealMax = 1f;
|
|
|
|
[Header("Transition Duration (seconds)")]
|
|
public float imagineColorDuration = 1f;
|
|
public float cannotImagineDuration = 1f;
|
|
public float eyeDisorderDuration = 2f;
|
|
public float canSeeColorDuration = 1f;
|
|
public float targetSwitchDuration = 1f;
|
|
|
|
[Header("Blur")]
|
|
[Tooltip("Blur when unfocused or module idle.")]
|
|
[Range(0f, 1f)] public float idleBlurAmount = 1f;
|
|
|
|
[Tooltip("Blur when focused and sharp.")]
|
|
[Range(0f, 1f)] public float focusedBlurAmount;
|
|
|
|
[Tooltip("Shader _BlurSize when blur is active.")]
|
|
[Range(0f, 0.02f)] public float blurSize = 0.008f;
|
|
|
|
[Header("Color Sweep (shader)")]
|
|
[Tooltip("Width of the directional color sweep during ColorIn/FadeOut.")]
|
|
[Range(0.001f, 1f)] public float revealWidth = 0.18f;
|
|
|
|
[Tooltip("Sweep direction in radians (0 = left-to-right).")]
|
|
[Range(0f, 6.28318f)] public float revealRotation;
|
|
|
|
[Range(0f, 1f)] public float revealNoise = 0.08f;
|
|
|
|
[Header("Distortion Pulse")]
|
|
[Tooltip("Peak _DistortAmount during ColorIn / FadeOut.")]
|
|
[Range(0f, 0.08f)] public float colorPulseDistortion = 0.035f;
|
|
|
|
[Header("Wrong Color (Eye Disorder)")]
|
|
public Color wrongColor = new(1f, 0.16f, 0.08f, 1f);
|
|
|
|
[Header("HSV")]
|
|
[Range(0f, 2f)] public float hsvSaturation = 1f;
|
|
|
|
[Header("Glitch / Memory Wave")]
|
|
public float glitchInDuration = 1f;
|
|
public float roundWaveInDuration = 2f;
|
|
public float roundWaveOutDuration = 0.5f;
|
|
public float glitchOutDuration = 0.5f;
|
|
|
|
public float GetDurationForState(EyeSystem.EyeColorState state) => state switch
|
|
{
|
|
EyeSystem.EyeColorState.CanImagineColor => imagineColorDuration,
|
|
EyeSystem.EyeColorState.CannotImagineColor => cannotImagineDuration,
|
|
EyeSystem.EyeColorState.EyeDisorder => eyeDisorderDuration,
|
|
EyeSystem.EyeColorState.CanSeeColor => canSeeColorDuration,
|
|
_ => imagineColorDuration
|
|
};
|
|
}
|
|
}
|