OVRRecord.cs 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /************************************************************************************
  2. Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
  3. Licensed under the Oculus Utilities SDK License Version 1.31 (the "License"); you may not use
  4. the Utilities SDK except in compliance with the License, which is provided at the time of installation
  5. or download, or which otherwise accompanies this software in either electronic or hard copy form.
  6. You may obtain a copy of the License at
  7. https://developer.oculus.com/licenses/utilities-1.31
  8. Unless required by applicable law or agreed to in writing, the Utilities SDK distributed
  9. under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
  10. ANY KIND, either express or implied. See the License for the specific language governing
  11. permissions and limitations under the License.
  12. ************************************************************************************/
  13. using System;
  14. using System.Collections.Generic;
  15. using System.Linq;
  16. using System.Text;
  17. namespace Assets.OVR.Scripts
  18. {
  19. public class Record
  20. {
  21. public string category;
  22. public string message;
  23. public Record(string cat, string msg)
  24. {
  25. category = cat;
  26. message = msg;
  27. }
  28. }
  29. public class RangedRecord : Record
  30. {
  31. public float value;
  32. public float min;
  33. public float max;
  34. public RangedRecord(string cat, string msg, float val, float minVal, float maxVal)
  35. : base(cat, msg)
  36. {
  37. value = val;
  38. min = minVal;
  39. max = maxVal;
  40. }
  41. }
  42. public delegate void FixMethodDelegate(UnityEngine.Object obj, bool isLastInSet, int selectedIndex);
  43. public class FixRecord : Record
  44. {
  45. public FixMethodDelegate fixMethod;
  46. public UnityEngine.Object targetObject;
  47. public string[] buttonNames;
  48. public bool editModeRequired;
  49. public bool complete;
  50. public FixRecord(string cat, string msg, FixMethodDelegate fix, UnityEngine.Object target, bool editRequired, string[] buttons)
  51. : base(cat, msg)
  52. {
  53. buttonNames = buttons;
  54. fixMethod = fix;
  55. targetObject = target;
  56. editModeRequired = editRequired;
  57. complete = false;
  58. }
  59. }
  60. }