AMAudioKey.cs 665 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. using System;
  2. using UnityEngine;
  3. [Serializable]
  4. public class AMAudioKey : AMKey
  5. {
  6. public bool setAudioClip(AudioClip audioClip)
  7. {
  8. if (this.audioClip != audioClip)
  9. {
  10. this.audioClip = audioClip;
  11. return true;
  12. }
  13. return false;
  14. }
  15. public bool setLoop(bool loop)
  16. {
  17. if (this.loop != loop)
  18. {
  19. this.loop = loop;
  20. return true;
  21. }
  22. return false;
  23. }
  24. public override AMKey CreateClone()
  25. {
  26. AMAudioKey amaudioKey = ScriptableObject.CreateInstance<AMAudioKey>();
  27. amaudioKey.frame = this.frame;
  28. amaudioKey.audioClip = this.audioClip;
  29. amaudioKey.loop = this.loop;
  30. return amaudioKey;
  31. }
  32. public AudioClip audioClip;
  33. public bool loop;
  34. }