diff --git a/Assets/Scenes/Game.unity b/Assets/Scenes/Game.unity index 2896662..344155a 100644 --- a/Assets/Scenes/Game.unity +++ b/Assets/Scenes/Game.unity @@ -1266,6 +1266,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3cd085963a2b0924587ac210ff73f837, type: 3} m_Name: m_EditorClassIdentifier: + buttonGoodColor: {r: 0, g: 0.4867924, b: 0, a: 1} + buttonGreatColor: {r: 0.735849, g: 0, b: 0.5863867, a: 1} + buttonPerfectColor: {r: 0.7132075, g: 0.6563782, b: 0, a: 1} --- !u!4 &592746511 Transform: m_ObjectHideFlags: 0 @@ -3052,8 +3055,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: a603b2d1fbc471d4abf512e887e20c8e, type: 3} m_Name: m_EditorClassIdentifier: - noteSpeed: 7 - touchSpeed: 7.5 tapPrefab: {fileID: 7955322054321000439, guid: de312956ab0060a49a3f3585e600c39a, type: 3} holdPrefab: {fileID: 7566527781932749496, guid: 558452b6e8eb68f44b4f035c27e37c25, type: 3} starPrefab: {fileID: 3599915660479470153, guid: 279b1bd0701d99f4183a5258db1374b2, type: 3} diff --git a/Assets/Script/DontDestroy/IO/LightManager.cs b/Assets/Script/DontDestroy/IO/LightManager.cs index 57d95cb..39f9ecf 100644 --- a/Assets/Script/DontDestroy/IO/LightManager.cs +++ b/Assets/Script/DontDestroy/IO/LightManager.cs @@ -116,6 +116,20 @@ public void SetButtonLight(Color lightColor, int button) } } + Coroutine[] timers = new Coroutine[8]; + public void SetButtonLightWithTimeout(Color lightColor, int button) + { + SetButtonLight(lightColor, button); + if (timers[button] != null) + StopCoroutine(timers[button]); + timers[button] = StartCoroutine(TurnWhiteAfter(button)); + } + IEnumerator TurnWhiteAfter(int button) + { + yield return new WaitForSeconds(0.3f); + SetButtonLight(Color.white, button); + } + IEnumerator DebugLights() { while (true) diff --git a/Assets/Script/Game/NoteEffectManager.cs b/Assets/Script/Game/NoteEffectManager.cs index 84b3bfb..084be74 100644 --- a/Assets/Script/Game/NoteEffectManager.cs +++ b/Assets/Script/Game/NoteEffectManager.cs @@ -13,6 +13,10 @@ public class NoteEffectManager : MonoBehaviour GameObject _fireworkEffect; Animator _fireworkEffectAnimator; + public Color buttonGoodColor = Color.green; + public Color buttonGreatColor = Color.red; + public Color buttonPerfectColor = Color.yellow; + void Awake() { MajInstanceHelper.Instance = this; @@ -45,7 +49,7 @@ public void PlayEffect(int position, in JudgeResult judgeResult) { case JudgeType.LateGood: case JudgeType.FastGood: - MajInstances.LightManager.SetButtonLight(Color.green, position); + MajInstances.LightManager.SetButtonLightWithTimeout(buttonGoodColor, position-1); break; case JudgeType.LateGreat: case JudgeType.LateGreat1: @@ -53,14 +57,14 @@ public void PlayEffect(int position, in JudgeResult judgeResult) case JudgeType.FastGreat2: case JudgeType.FastGreat1: case JudgeType.FastGreat: - MajInstances.LightManager.SetButtonLight(new Color(1, 0.54f, 1f), position); + MajInstances.LightManager.SetButtonLightWithTimeout(buttonGreatColor, position-1); break; case JudgeType.LatePerfect2: case JudgeType.FastPerfect2: case JudgeType.LatePerfect1: case JudgeType.FastPerfect1: case JudgeType.Perfect: - MajInstances.LightManager.SetButtonLight(new Color(0.99f, 0.99f, 0.717f), position); + MajInstances.LightManager.SetButtonLightWithTimeout(buttonPerfectColor, position-1); break; } _effectPool.Play(judgeResult, position);