179 lines
4.2 KiB
C#
179 lines
4.2 KiB
C#
public interface IEyeStateEffect
|
|
{
|
|
float TransitionDuration { get; }
|
|
void InitializeEffect(EyeTarget target, ViewCameraManager cameraManager);
|
|
void CleanupEffect(EyeTarget target);
|
|
void ApplyFocusedEffect(EyeTarget target);
|
|
void ApplyUnfocusedEffect(EyeTarget target);
|
|
}
|
|
|
|
public class CanImagineColorEffect : IEyeStateEffect
|
|
{
|
|
public float TransitionDuration => 1f;
|
|
|
|
public void InitializeEffect(EyeTarget target, ViewCameraManager cameraManager)
|
|
{
|
|
target.SetToNoWrongColor();
|
|
target.SetToMaxBurnRadius();
|
|
target.SetToMinBlur();
|
|
if (target.targetTransform)
|
|
{
|
|
cameraManager.SetCameraPosition(target.targetTransform);
|
|
}
|
|
else
|
|
{
|
|
cameraManager.SetCameraPosition(target.transform);
|
|
}
|
|
}
|
|
|
|
public void CleanupEffect(EyeTarget target)
|
|
{
|
|
target.SetToMinBurnRadius();
|
|
target.SetToMaxBlur();
|
|
// Add cleanup logic here
|
|
}
|
|
|
|
public void ApplyFocusedEffect(EyeTarget target)
|
|
{
|
|
target.ColorIn(TransitionDuration);
|
|
}
|
|
|
|
public void ApplyUnfocusedEffect(EyeTarget target)
|
|
{
|
|
target.FadeOut(TransitionDuration);
|
|
}
|
|
}
|
|
|
|
public class CannotImagineColorEffect : IEyeStateEffect
|
|
{
|
|
public float TransitionDuration { get; } = 1f;
|
|
|
|
public void InitializeEffect(EyeTarget target, ViewCameraManager cameraManager)
|
|
{
|
|
target.SetToMinBlur(false);
|
|
target.SetToMinBurnRadius();
|
|
target.SetToNoWrongColor();
|
|
if (target.targetTransform)
|
|
{
|
|
cameraManager.SetCameraPosition(target.targetTransform);
|
|
}
|
|
else
|
|
{
|
|
cameraManager.SetCameraPosition(target.transform);
|
|
}
|
|
}
|
|
|
|
public void CleanupEffect(EyeTarget target)
|
|
{
|
|
// Add cleanup logic here
|
|
target.SetToMaxBlur(false);
|
|
}
|
|
|
|
public void ApplyFocusedEffect(EyeTarget target)
|
|
{
|
|
target.BlurOut(TransitionDuration, false);
|
|
}
|
|
|
|
public void ApplyUnfocusedEffect(EyeTarget target)
|
|
{
|
|
target.BlurIn(TransitionDuration, false);
|
|
}
|
|
}
|
|
|
|
public class EyeDisorderEffect : IEyeStateEffect
|
|
{
|
|
public float TransitionDuration { get; } = 2f;
|
|
|
|
public void InitializeEffect(EyeTarget target, ViewCameraManager cameraManager)
|
|
{
|
|
target.SetToMinBurnRadius();
|
|
// Add initialization logic here
|
|
if (target.targetTransform)
|
|
{
|
|
cameraManager.SetCameraPosition(target.targetTransform);
|
|
}
|
|
else
|
|
{
|
|
cameraManager.SetCameraPosition(target.transform);
|
|
}
|
|
|
|
target.SetToWrongColor();
|
|
target.SetToMinBlur(false);
|
|
}
|
|
|
|
public void CleanupEffect(EyeTarget target)
|
|
{
|
|
// Add cleanup logic here
|
|
target.SetToNoWrongColor();
|
|
}
|
|
|
|
public void ApplyFocusedEffect(EyeTarget target)
|
|
{
|
|
target.WrongColorIn(TransitionDuration);
|
|
}
|
|
|
|
public void ApplyUnfocusedEffect(EyeTarget target)
|
|
{
|
|
target.WrongColorOut(TransitionDuration);
|
|
}
|
|
}
|
|
|
|
|
|
public class CanSeeColorEffect : IEyeStateEffect
|
|
{
|
|
public float TransitionDuration { get; } = 1f;
|
|
|
|
public void InitializeEffect(EyeTarget target, ViewCameraManager cameraManager)
|
|
{
|
|
target.SetToNoWrongColor();
|
|
target.SetToMaxBurnRadius();
|
|
if (target.targetTransform)
|
|
{
|
|
cameraManager.SetCameraPosition(target.targetTransform);
|
|
}
|
|
else
|
|
{
|
|
cameraManager.SetCameraPosition(target.transform);
|
|
}
|
|
|
|
target.SetToMinBlur();
|
|
}
|
|
|
|
public void CleanupEffect(EyeTarget target)
|
|
{
|
|
// Add cleanup logic here
|
|
target.SetToMaxBlur();
|
|
}
|
|
|
|
public void ApplyFocusedEffect(EyeTarget target)
|
|
{
|
|
target.BlurOut(TransitionDuration);
|
|
}
|
|
|
|
public void ApplyUnfocusedEffect(EyeTarget target)
|
|
{
|
|
target.BlurIn(TransitionDuration);
|
|
}
|
|
}
|
|
|
|
public class HaveChip : IEyeStateEffect
|
|
{
|
|
public float TransitionDuration { get; } = 1f;
|
|
|
|
public void InitializeEffect(EyeTarget target, ViewCameraManager cameraManager)
|
|
{
|
|
}
|
|
|
|
public void CleanupEffect(EyeTarget target)
|
|
{
|
|
// Add cleanup logic here
|
|
}
|
|
|
|
public void ApplyFocusedEffect(EyeTarget target)
|
|
{
|
|
}
|
|
|
|
public void ApplyUnfocusedEffect(EyeTarget target)
|
|
{
|
|
}
|
|
} |