From 78d08856cfd54442a6217203e2d0cb0f48b71d18 Mon Sep 17 00:00:00 2001 From: Jenny Crowe Date: Thu, 17 Feb 2022 05:11:06 -0700 Subject: [PATCH] BTSDS: Implemented upscale hit graphic. Tweezers: Added background color events. --- Assets/Resources/Games/rhythmTweezers.prefab | 1 + .../Materials/Effects/EffectsLine01.png | Bin 180 -> 5694 bytes .../Games/RhythmTweezers/RhythmTweezers.cs | 35 ++++++++++++++++++ Assets/Scripts/Minigames.cs | 9 +++++ 4 files changed, 45 insertions(+) diff --git a/Assets/Resources/Games/rhythmTweezers.prefab b/Assets/Resources/Games/rhythmTweezers.prefab index d30196df..8384d608 100644 --- a/Assets/Resources/Games/rhythmTweezers.prefab +++ b/Assets/Resources/Games/rhythmTweezers.prefab @@ -2185,6 +2185,7 @@ MonoBehaviour: Vegetable: {fileID: 6331401567023014501} VegetableDupe: {fileID: 9096051369561297840} VegetableAnimator: {fileID: 3603513546661280919} + bg: {fileID: 5813499711658895221} Tweezers: {fileID: 3391455012319192365} hairBase: {fileID: 4104508031135416673} longHairBase: {fileID: 2904820922900361117} diff --git a/Assets/Resources/Sprites/Games/BuiltToScaleDS/Materials/Effects/EffectsLine01.png b/Assets/Resources/Sprites/Games/BuiltToScaleDS/Materials/Effects/EffectsLine01.png index c9817b2fd768f23c4d8642cc13e7751e8951fea5..e3ad893dc797989fefe8af65c921a5864106b431 100644 GIT binary patch literal 5694 zcmZ`-c{r5q_kYINP4;YAhAdf=B1?>=WEU!hVKkOx8~YMwvQ0`ETVyX=i+!gUOJylb z@>&W*WM~*P3=_t0-uL(S_qne7dhT;R_c`ZtpL1QGKkk%kHdjw@ig5w}aKhZ|vONHR z7+Vm)&dT_?1i$k7*9x(}Y7Eqjh_5jWW^W^FBLJvR<2rO_Vb~lfv)ds6z}@%n0`&*J z@&JI7-^?!?U5|9#DCDVeXbWm9MPfBWC>qp59Z%(j(pkN%O~g%BSxwi?Ed%HeQk!f1sDUreXCsi z$28i#FS&Wc-bVrmH9VD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C>6i~q)XVLia8c5K0YwE36d_W^m{$SO z1}?-b1mo4_il_|j)KGL3FdpRvbd8O=uNX9lz%q9ewG2}?7-{Q5r>D&YMLvdCfiH?_B{A>Ho#ofk?8S!acALZDmF5i$t z=1NS<)hO*OeRm1mPE!BPBw+-s^0GXT@-Z2u{zP4UfprPAhi)afypUtYaN7a<9a@#P zu140s1^KcU6||!Cd(k*adqa_>N5j?9KpVlS9_^%M=<#(9JkIAnt9a(aGlS2pOorGqKtb7)9QK4?V-=$d{Tao_ z`*Lfi#_<-C_hRfCir?oV4gbqzICuNOb+B4d)M$O-Y%Dm<>{vF|IvBcd>k}Ipq?v;- z1Xe{@9;|=+bosdgv`um0smVnW)tr!3lpzi&y2-nr(qeAHIKpJuvfn|!_BUcsv?pO) za*a@Sd{Z5TG3RD58Dlnk7FB~iV0C%0y54;n)@nhx0o^(nWTfWR1vR=CVYb}HhsWJ4 zZIyU0ZC=E3gGx*U0TI?OnH``WJQ1=LSY~T}fGy&~C5Ll8c3d`x!?rh%GM1BU;SQ+u z0M6QHtR!z{07KTXk51ST9w%5h3o^%9{ODnf`dPicqR7w4iS9-|f?9jgf;`Iufife_ zcO1Z6aPTyf)xqT3vIz4C3;d-rc@U_?`IeCQ9c}i=W+acWD?>G={`V{C|066nZ_=f> WVNJ@3W`FoUJ$bGgPC5&wU}E5|JW literal 180 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`)t)YnAr*7B_T1(>pupqw^}qcs zPHyhirPC$OJFj+FnJOr@B`j*~^WWU_o){?sjKZcxjtrZb d+*4(=W!6r%7d)uIIs@no22WQ%mvv4FO#pjBK=A+o diff --git a/Assets/Scripts/Games/RhythmTweezers/RhythmTweezers.cs b/Assets/Scripts/Games/RhythmTweezers/RhythmTweezers.cs index 145246e0..4e19c973 100644 --- a/Assets/Scripts/Games/RhythmTweezers/RhythmTweezers.cs +++ b/Assets/Scripts/Games/RhythmTweezers/RhythmTweezers.cs @@ -17,6 +17,7 @@ namespace RhythmHeavenMania.Games.RhythmTweezers public SpriteRenderer Vegetable; public SpriteRenderer VegetableDupe; public Animator VegetableAnimator; + public SpriteRenderer bg; public Tweezers Tweezers; public GameObject hairBase; public GameObject longHairBase; @@ -42,6 +43,7 @@ namespace RhythmHeavenMania.Games.RhythmTweezers Tween transitionTween; bool transitioning = false; + Tween bgColorTween; private static Color _defaultOnionColor; public static Color defaultOnionColor @@ -63,6 +65,16 @@ namespace RhythmHeavenMania.Games.RhythmTweezers } } + private static Color _defaultBgColor; + public static Color defaultBgColor + { + get + { + ColorUtility.TryParseHtmlString("#D8FFC1", out _defaultBgColor); + return _defaultBgColor; + } + } + public static RhythmTweezers instance { get; set; } private void Awake() @@ -171,6 +183,29 @@ namespace RhythmHeavenMania.Games.RhythmTweezers VegetableDupe.color = newColor; } + public void ChangeBackgroundColor(Color color, float beats) + { + var seconds = Conductor.instance.secPerBeat * beats; + + if (bgColorTween != null) + bgColorTween.Kill(true); + + if (seconds == 0) + { + bg.color = color; + } + else + { + bgColorTween = bg.DOColor(color, seconds); + } + } + + public void FadeBackgroundColor(Color start, Color end, float beats) + { + ChangeBackgroundColor(start, 0f); + ChangeBackgroundColor(end, beats); + } + private void Update() { if (!Conductor.instance.isPlaying && !Conductor.instance.isPaused && intervalStarted) diff --git a/Assets/Scripts/Minigames.cs b/Assets/Scripts/Minigames.cs index 6fb61843..bb90f923 100644 --- a/Assets/Scripts/Minigames.cs +++ b/Assets/Scripts/Minigames.cs @@ -216,6 +216,15 @@ namespace RhythmHeavenMania } ), new GameAction("set tweezer delay", delegate { RhythmTweezers.instance.tweezerBeatOffset = eventCaller.currentEntity.length; }, 1f, true), new GameAction("reset tweezer delay", delegate { RhythmTweezers.instance.tweezerBeatOffset = 0f; }, 0.5f), + new GameAction("set background color", delegate { var e = eventCaller.currentEntity; RhythmTweezers.instance.ChangeBackgroundColor(e.colorA, 0f); }, 0.5f, false, new List() + { + new Param("colorA", RhythmTweezers.defaultBgColor, "Background Color") + } ), + new GameAction("fade background color", delegate { var e = eventCaller.currentEntity; RhythmTweezers.instance.FadeBackgroundColor(e.colorA, e.colorB, e.length); }, 1f, true, new List() + { + new Param("colorA", Color.white, "Start Color"), + new Param("colorB", RhythmTweezers.defaultBgColor, "End Color") + } ), }), new Minigame("rhythmRally", "Rhythm Rally \n[WIP don't use]", "B888F8", true, false, new List()