SoundAdapter.cs 1016 B

123456789101112131415161718192021222324252627
  1. using UnityEngine;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using CommonLang;
  5. using CommonLang.Concurrent;
  6. using CommonUnity3D.MFUnity.LoadUtil;
  7. namespace CommonAIClient.Unity.Utils
  8. {
  9. public abstract class Audio { }
  10. public abstract class SoundAdapter
  11. {
  12. public abstract void PlayBGM(string name);
  13. public abstract void PlaySound(string name, Vector3 pos, float distance = 20f);
  14. public abstract void PlaySound(string name, int timeMS, Vector3 pos, float distance = 20f);
  15. public abstract Audio PlaySoundLoop(string name, Vector3 pos, float distance = 20f);
  16. public abstract void PlaySound(string name, GameObject obj, float distance = 20f);
  17. public abstract void PlaySound(string name, int timeMS, GameObject obj, float distance = 20f);
  18. public abstract Audio PlaySoundLoop(string name, GameObject obj, float distance = 20f);
  19. public abstract void StopSoundLoop(Audio sound);
  20. public abstract void Clear();
  21. }
  22. }