TO SQUASH: Jesus!!

This commit is contained in:
2026-08-19 13:18:26 -04:00
parent 1cf68b32a1
commit 24d3297daa
16 changed files with 607 additions and 320 deletions
+22 -1
View File
@@ -48,7 +48,7 @@ public class Multiplier : MonoBehaviour
if (stateTimer >= stateDuration)
{
stateTimer = 0f;
multiplierValue = ((multiplierValue + 1) % 4);
multiplierValue = (multiplierValue + 1) % 4;
multiplierAnimator.SetInteger("bonus", multiplierValue + 1);
}
@@ -66,4 +66,25 @@ public class Multiplier : MonoBehaviour
yield return new WaitForSeconds(1.5f);
Destroy(gameObject);
}
public void AwardToPlayer(Player player)
{
if (isActive)
{
isActive = false;
if (multiplierValue == 0)
{
audioSource.PlayOneShot(gotHalfSound);
player.multiplier = 0.5f;
}
else
{
audioSource.PlayOneShot(gotItSound);
player.multiplier = (float)(multiplierValue + 1);
}
multiplierSpriteRenderer.enabled = false;
StartCoroutine(DestroyAfterDelay());
}
}
}