diff --git a/Assets/Scripts/IllusionPatternLoader.cs b/Assets/Scripts/IllusionPatternLoader.cs index 25d3dc16..3e5c9bca 100644 --- a/Assets/Scripts/IllusionPatternLoader.cs +++ b/Assets/Scripts/IllusionPatternLoader.cs @@ -15,7 +15,7 @@ void Start() RawImage = GameObject.Find("RawImage"); abstractIllusionPattern ouchiLength = new ouchiLength(stepSize: 0.1f); - abstractIllusionPattern ouchiColor = new ouchiColor(stepSize: 0.05f); + abstractIllusionPattern ouchiColor = new ouchiColor(stepSize: 0.04f); allPatterns.Add(ouchiLength); allPatterns.Add(ouchiColor); diff --git a/Assets/Scripts/illusions/ouchiColor.cs b/Assets/Scripts/illusions/ouchiColor.cs index 23bba8cb..26ee6913 100644 --- a/Assets/Scripts/illusions/ouchiColor.cs +++ b/Assets/Scripts/illusions/ouchiColor.cs @@ -49,7 +49,7 @@ public override float GetCurrentRatio() Debug.LogWarning("ForegroundColor: " + foregroundColor + " BackgroundColor: " + backgroundColor); if (foregroundColor == 0) { - return 0.0f; + return 10f; } else { @@ -66,17 +66,22 @@ public override float GetInitRatio() public override void DecreasePatternRatio() { - if (foregroundColor + stepSize <= 1.0f) + if (backgroundColor > foregroundColor) { foregroundColor += stepSize; backgroundColor -= stepSize; } + else + { + foregroundColor = backgroundColor = 0.5f; + } + texture = GeneratePattern(); } public override void IncreasePatternRatio() { - if (backgroundColor >= foregroundColor) + if (foregroundColor - stepSize >= 0.0f) { backgroundColor += stepSize; foregroundColor -= stepSize;