You've already forked super-mario-bros
mirror of
https://github.com/izzy2lost/super-mario-bros.git
synced 2026-03-26 16:58:05 -07:00
33 lines
873 B
C#
33 lines
873 B
C#
using System.Collections;
|
|
using UnityEngine;
|
|
|
|
public class DummyScript : MonoBehaviour
|
|
{
|
|
void Start()
|
|
{
|
|
SoundGuy.Instance.PlaySound("main_theme", true);
|
|
// StartCoroutine(PlayStarSound());
|
|
}
|
|
|
|
private IEnumerator PlayStarSound()
|
|
{
|
|
yield return new WaitForSeconds(5);
|
|
SoundGuy.Instance.PlaySound("star_theme", true);
|
|
yield return new WaitForSeconds(3);
|
|
SoundGuy.Instance.PlaySound("main_theme", true);
|
|
SoundGuy.Instance.PlaySound("Player damage 2", false, OnSoundEnd);
|
|
yield return new WaitForSeconds(3);
|
|
SoundGuy.Instance.PlaySound("Player damage 2", false, OnSoundEnd);
|
|
}
|
|
|
|
private void OnSoundEnd()
|
|
{
|
|
print("I got called!");
|
|
}
|
|
|
|
public void PlayDeathSound()
|
|
{
|
|
SoundGuy.Instance.PlaySound("Player damage 2", false, OnSoundEnd);
|
|
}
|
|
}
|