Advertisement
Guest User

Untitled

a guest
Jan 18th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.64 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class FrameRecorder
  6. {
  7. public static bool isRecording = false;
  8.  
  9. public static Transform[] recordedTransforms;
  10.  
  11.  
  12.  
  13.  
  14. public static InitializeRecording(Transform[] recordedTransforms) {
  15. FrameRecorder recordedTransforms = recordedTransforms;
  16. //maybe some meta information here
  17. }
  18. public static StartRecording() {
  19. isRecording = true;
  20. }
  21. public static AddFrame(float time) {
  22. //NativeFrameRecorder.AddFrame(time,recordedTransforms, recordedTransforms.length);
  23. }
  24. public static AddEvent(float time, int length, byte[] bytes) {
  25. //NativeFrameRecorder.AddFrame(time,length, bytes);
  26. }
  27. public static RegisterBall(/*ball information, maybe color, texture...*/) {
  28. //int ballKey = NativeFrameRecorder.RegisterBall(ball info)
  29. }
  30. public static AddFixedState(int ballKey, Kinematics kinematics) { //ball color?..design...?
  31.  
  32. }
  33.  
  34. public static StopRecording() {
  35.  
  36. }
  37. public static SaveRecording() {
  38.  
  39. }
  40. public static LoadRecording() {
  41.  
  42. }
  43.  
  44.  
  45.  
  46. }
  47.  
  48.  
  49.  
  50. /*
  51. recording:
  52. channel 1 recording events by frame number
  53.  
  54. [
  55. size
  56. {
  57. event time
  58. event code
  59. event data {size is derivable,data}
  60. }
  61. ...
  62. ..
  63.  
  64. until size = 0
  65. ]
  66.  
  67.  
  68.  
  69.  
  70. such as spawn or unspawn objects
  71. (for everything but balls, channel 2 holds information)
  72. (for balls, each ball that spawns has an incrementing ID in the recording)...this ID is alluded to in channel 4
  73. score changes
  74. something else
  75. .....
  76. channel 2
  77. frame[
  78. can do number of frames
  79. {
  80. timestamp,....any changes to item should come at the same time stamp...which means, the number of statics should be derivable
  81. statics per item
  82.  
  83. }
  84. ]
  85. channel 3 ---when ball states end, ball is no longer rendered
  86. ball fixed states
  87. number of subChannels
  88. subChannels
  89. number of states
  90. time
  91. kinematic transform
  92. channel 4
  93. number of voices
  94. voices
  95. data size
  96. data stream
  97. positional data
  98. state count
  99. [
  100. {
  101. time
  102. position (direction?)
  103. }
  104. ]
  105.  
  106.  
  107. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement