Soundtrack.cs 763 B

123456789101112131415161718192021222324252627
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using Sirenix.OdinInspector;
  5. namespace KairoEngine.SoundtrackSystem
  6. {
  7. public enum SoundtrackType
  8. {
  9. Single,
  10. Layered
  11. }
  12. [CreateAssetMenu(fileName = "Soundtrack", menuName = "KairoEngine/Soundtrack", order = 3)]
  13. public class Soundtrack : SerializedScriptableObject
  14. {
  15. public SoundtrackType soundtrackType;
  16. [ShowIf("@soundtrackType == SoundtrackType.Single")] public AudioClip audioClip;
  17. [ShowIf("@soundtrackType == SoundtrackType.Layered")] public List<AudioClip> audioClips;
  18. public bool loop = true;
  19. public bool fadeIn = false;
  20. [ShowIf("@fadeIn == true")] public float fadeTime = 1f;
  21. }
  22. }