Exemple #1
0
 public void PlayBell()
 {
     if (!_bell.IsPlaying())
     {
         _bell.Play();
     }
 }
Exemple #2
0
        public void Awake()
        {
            if (_instance == null)
            {
                _instance = this;
                DontDestroyOnLoad(gameObject);

                _music = new FMODObject("event:/Music");
                _music.SetParameter("Music1", 0.0f);
                _music.SetParameter("Music2", 0.0f);
                _music.SetParameter("Music3", 0.0f);
                _music.SetParameter("Percussion", 0.0f);
                _music.Play();
                _wind = new FMODObject("event:/Wind");
                _bell = new FMODObject("event:/Bell");
                _bell.SetParameter("Volume", Bell);
                _steps        = new FMODObject("event:/Steps");
                _shovel       = new FMODObject("event:/Shovel");
                _pickupCoffin = new FMODObject("event:/PickupCoffin");
                _throwCoffin  = new FMODObject("event:/ThrowCoffin");
                _cart         = new FMODObject("event:/CartLoop");
                _cart.SetParameter("Volume", 0.75f);
                _raiseTomb = new FMODObject("event:/RaiseTomb");
                _tones     = new FMODObject("event:/Tones");
                _door      = new FMODObject("event:/GiantDoor");
            }
            else
            {
                Destroy(gameObject);
            }
        }
Exemple #3
0
 public void PlaySteps()
 {
     if (StepsSpeed == 0.0f)
     {
         return;
     }
     if (_steps.IsPlaying())
     {
         if (_steps.GetNormalizedTimelinePosition() >= 1 - StepsSpeed)
         {
             _steps.Play();
         }
     }
     else
     {
         _steps.Play();
     }
 }
Exemple #4
0
 public void FadeInWind()
 {
     _wind.Play();
     StartCoroutine(Fade(_wind, "Volume", Wind, WindFadeTime));
 }
Exemple #5
0
 public void PlayShovel()
 {
     _shovel.Play();
 }
Exemple #6
0
 public void PlayDoor()
 {
     _door.Play();
 }
Exemple #7
0
 public void PlayTone()
 {
     _tones.Play();
 }
Exemple #8
0
 public void PlayRaiseTomb()
 {
     _raiseTomb.Play();
 }
Exemple #9
0
 public void PlayCart()
 {
     _cart.Play();
 }
Exemple #10
0
 public void PlayThrowCoffin()
 {
     _throwCoffin.Play();
 }
Exemple #11
0
 public void PlayPickupCoffin()
 {
     _pickupCoffin.Play();
 }