From ef27e832545e188ca5059b5765ed66ff439cc187 Mon Sep 17 00:00:00 2001 From: Carson Kompon Date: Sat, 26 Feb 2022 18:10:22 -0500 Subject: [PATCH] Added coloured shadows to Karate Man This is very pogchamp! --- Assets/Resources/Games/karateman.prefab | 4 ++++ Assets/Scripts/Games/KarateMan/KarateJoe.cs | 6 ++++++ Assets/Scripts/Games/KarateMan/Pot.cs | 6 +++++- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Assets/Resources/Games/karateman.prefab b/Assets/Resources/Games/karateman.prefab index 2548eab2..7fc2e68b 100644 --- a/Assets/Resources/Games/karateman.prefab +++ b/Assets/Resources/Games/karateman.prefab @@ -6257,6 +6257,10 @@ MonoBehaviour: - {fileID: 3379959602278205485, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3} - {fileID: 8497358629359107968, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3} missEffect: {fileID: 564650125393930190} + shadows: + - {fileID: 7248900332856218914} + - {fileID: 7248900333476518146} + - {fileID: 4233113091070337915} hitBarrel: 0 inCombo: 0 hitCombo: 0 diff --git a/Assets/Scripts/Games/KarateMan/KarateJoe.cs b/Assets/Scripts/Games/KarateMan/KarateJoe.cs index 587a7c2b..164fa3bf 100644 --- a/Assets/Scripts/Games/KarateMan/KarateJoe.cs +++ b/Assets/Scripts/Games/KarateMan/KarateJoe.cs @@ -18,6 +18,7 @@ namespace RhythmHeavenMania.Games.KarateMan [SerializeField] private SpriteRenderer head; [SerializeField] private Sprite[] heads; [SerializeField] private GameObject missEffect; + [SerializeField] private SpriteRenderer[] shadows; [Header("Properties")] public bool hitBarrel = false; @@ -168,6 +169,11 @@ namespace RhythmHeavenMania.Games.KarateMan Swing(null); } } + + for(int i=0;i < shadows.Length; i++) + { + shadows[i].color = Color.Lerp(KarateMan.instance.BGColor, new Color(35 / 255, 75 / 255, 1 / 255), 0.25f); + } } public void Combo(Pot p) diff --git a/Assets/Scripts/Games/KarateMan/Pot.cs b/Assets/Scripts/Games/KarateMan/Pot.cs index 1e0692c4..d622ffbd 100644 --- a/Assets/Scripts/Games/KarateMan/Pot.cs +++ b/Assets/Scripts/Games/KarateMan/Pot.cs @@ -116,10 +116,14 @@ namespace RhythmHeavenMania.Games.KarateMan private void Update() { if (Conductor.instance.songPositionInBeats >= createBeat) + { spriteComp.enabled = true; + shadowSpriteComp.color = Color.Lerp(KarateMan.instance.BGColor, new Color(35 / 255, 75 / 255, 1 / 255), 0.25f); + } else + { spriteComp.enabled = false; - + } float time2Destroy = Conductor.instance.GetPositionFromBeat(createBeat, 4);