OVRLipSyncSequence.cs 506 B

12345678910111213141516171819202122
  1. using System;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. [Serializable]
  5. public class OVRLipSyncSequence : ScriptableObject
  6. {
  7. public OVRLipSync.Frame GetFrameAtTime(float time)
  8. {
  9. OVRLipSync.Frame result = null;
  10. if (time < this.length && this.entries.Count > 0)
  11. {
  12. float num = time / this.length;
  13. result = this.entries[(int)((float)this.entries.Count * num)];
  14. }
  15. return result;
  16. }
  17. public List<OVRLipSync.Frame> entries = new List<OVRLipSync.Frame>();
  18. public float length;
  19. }