Implement sound effects

This commit is contained in:
RochesterX
2025-04-12 17:24:51 -04:00
parent e122129196
commit 274d87241f
20 changed files with 1829 additions and 4 deletions

View File

@@ -217,6 +217,7 @@ public class GameManager : MonoBehaviour
while (!winner.GetComponent<UseItem>().IsHoldingItem())
{
hatObject.transform.position = winner.transform.position + Vector3.up * 3/2;
winner.GetComponent<UseItem>().PickUpItem(hatObject);
yield return null;
}
}

View File

@@ -17,6 +17,7 @@ public class HatRespawn : MonoBehaviour
void Update() // Checks if the hat has been inactive for too long
{
if (GameManager.Instance.gameOver) GetComponent<BoxCollider2D>().enabled = false;
if (isDropped && Time.time - lastInteractionTime > respawnTime)
{
RespawnHat();