Sounds
This commit is contained in:
@@ -3,6 +3,7 @@ using System.Collections;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using Random = System.Random;
|
||||
|
||||
public class PlayerMove : MonoBehaviour
|
||||
{
|
||||
@@ -34,6 +35,8 @@ public class PlayerMove : MonoBehaviour
|
||||
{
|
||||
rb = GetComponent<Rigidbody>();
|
||||
standUp = GetComponentInChildren<StandUpCollider>();
|
||||
|
||||
StartCoroutine(MakeSound(7f));
|
||||
}
|
||||
|
||||
void Update()
|
||||
@@ -113,6 +116,7 @@ public class PlayerMove : MonoBehaviour
|
||||
{
|
||||
StartCoroutine(Step(0.3f));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -135,5 +139,15 @@ public class PlayerMove : MonoBehaviour
|
||||
|
||||
}
|
||||
|
||||
|
||||
IEnumerator MakeSound(float delay)
|
||||
{
|
||||
|
||||
while (true)
|
||||
{
|
||||
yield return new WaitForSeconds(delay);
|
||||
|
||||
SoundEffectManager.Play("Penguin Sound");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user