Implement sound effects
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user