Vous ne pouvez pas sélectionner plus de 25 sujets
Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
|
- using System;
- using System.Collections;
- using SUISS.Core;
- using UnityEngine;
-
- public abstract class CIGSoundOnEvent : MonoBehaviour
- {
- protected virtual void Start()
- {
- }
-
- protected virtual void Awake()
- {
- }
-
- protected virtual void OnDestroy()
- {
- }
-
- protected void PlaySound()
- {
- base.StartCoroutine(this.PlaySoundCoroutine());
- }
-
- private IEnumerator PlaySoundCoroutine()
- {
- yield return new WaitForSeconds(this.delay);
- SingletonMonobehaviour<CIGAudioManager>.Instance.PlayClip(this.sound, this.volume);
- yield break;
- }
-
- [SerializeField]
- private AudioClip sound;
-
- [SerializeField]
- private float volume = 1f;
-
- [SerializeField]
- private float delay;
- }
|