Added coloured shadows to Karate Man

This is very pogchamp!
This commit is contained in:
Carson Kompon 2022-02-26 18:10:22 -05:00
parent ef710cc714
commit ef27e83254
3 changed files with 15 additions and 1 deletions

View File

@ -6257,6 +6257,10 @@ MonoBehaviour:
- {fileID: 3379959602278205485, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3} - {fileID: 3379959602278205485, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3}
- {fileID: 8497358629359107968, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3} - {fileID: 8497358629359107968, guid: 868cd67f05ca7c646bae00fcc2ba7eaa, type: 3}
missEffect: {fileID: 564650125393930190} missEffect: {fileID: 564650125393930190}
shadows:
- {fileID: 7248900332856218914}
- {fileID: 7248900333476518146}
- {fileID: 4233113091070337915}
hitBarrel: 0 hitBarrel: 0
inCombo: 0 inCombo: 0
hitCombo: 0 hitCombo: 0

View File

@ -18,6 +18,7 @@ namespace RhythmHeavenMania.Games.KarateMan
[SerializeField] private SpriteRenderer head; [SerializeField] private SpriteRenderer head;
[SerializeField] private Sprite[] heads; [SerializeField] private Sprite[] heads;
[SerializeField] private GameObject missEffect; [SerializeField] private GameObject missEffect;
[SerializeField] private SpriteRenderer[] shadows;
[Header("Properties")] [Header("Properties")]
public bool hitBarrel = false; public bool hitBarrel = false;
@ -168,6 +169,11 @@ namespace RhythmHeavenMania.Games.KarateMan
Swing(null); 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) public void Combo(Pot p)

View File

@ -116,10 +116,14 @@ namespace RhythmHeavenMania.Games.KarateMan
private void Update() private void Update()
{ {
if (Conductor.instance.songPositionInBeats >= createBeat) if (Conductor.instance.songPositionInBeats >= createBeat)
{
spriteComp.enabled = true; spriteComp.enabled = true;
shadowSpriteComp.color = Color.Lerp(KarateMan.instance.BGColor, new Color(35 / 255, 75 / 255, 1 / 255), 0.25f);
}
else else
{
spriteComp.enabled = false; spriteComp.enabled = false;
}
float time2Destroy = Conductor.instance.GetPositionFromBeat(createBeat, 4); float time2Destroy = Conductor.instance.GetPositionFromBeat(createBeat, 4);