diff --git a/08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Scenes/DarkSea.unity b/08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Scenes/DarkSea.unity index 1ca2168..19205c0 100644 --- a/08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Scenes/DarkSea.unity +++ b/08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Scenes/DarkSea.unity @@ -323,7 +323,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: fade_sec: 1 - loop_to_trigger: 1 + loop_to_trigger: 4 idle_player: {fileID: 540220394} h_player: {fileID: 1232323602} h_grp: {fileID: 1781519744} diff --git a/08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Scripts/StatManager.cs b/08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Scripts/StatManager.cs index faed1ac..257bbe9 100644 --- a/08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Scripts/StatManager.cs +++ b/08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Scripts/StatManager.cs @@ -76,7 +76,7 @@ public class StatManager : MonoBehaviour IEnumerator h_fade_in() { h_lerp_val = 0f; - while (h_grp.alpha <= 1f) + while (h_grp.alpha < 1f) { h_lerp_val += Time.deltaTime / fade_sec; h_grp.alpha = Mathf.Lerp(0f, 1f, h_lerp_val); @@ -88,7 +88,7 @@ public class StatManager : MonoBehaviour IEnumerator h_fade_out() { h_lerp_val = 1f; - while (h_grp.alpha >= 0f) + while (h_grp.alpha > 0f) { h_lerp_val -= Time.deltaTime / fade_sec; h_grp.alpha = Mathf.Lerp(0f, 1f, h_lerp_val); @@ -100,9 +100,9 @@ public class StatManager : MonoBehaviour IEnumerator s_fade_in() { s_lerp_val = 0f; - while (h_grp.alpha <= 1f) + while (s_grp.alpha < 1f) { - s_lerp_val += Time.deltaTime / fade_sec; + s_lerp_val += Time.deltaTime*2f; s_grp.alpha = Mathf.Lerp(0f, 1f, s_lerp_val); yield return null; } @@ -112,9 +112,9 @@ public class StatManager : MonoBehaviour IEnumerator s_fade_out() { s_lerp_val = 1f; - while (h_grp.alpha >= 0f) + while (s_grp.alpha > 0f) { - s_lerp_val -= Time.deltaTime / fade_sec; + s_lerp_val -= Time.deltaTime*2f; s_grp.alpha = Mathf.Lerp(0f, 1f, s_lerp_val); yield return null; }