Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class FrameRecorder
- {
- public static bool isRecording = false;
- public static Transform[] recordedTransforms;
- public static InitializeRecording(Transform[] recordedTransforms) {
- FrameRecorder recordedTransforms = recordedTransforms;
- //maybe some meta information here
- }
- public static StartRecording() {
- isRecording = true;
- }
- public static AddFrame(float time) {
- //NativeFrameRecorder.AddFrame(time,recordedTransforms, recordedTransforms.length);
- }
- public static AddEvent(float time, int length, byte[] bytes) {
- //NativeFrameRecorder.AddFrame(time,length, bytes);
- }
- public static RegisterBall(/*ball information, maybe color, texture...*/) {
- //int ballKey = NativeFrameRecorder.RegisterBall(ball info)
- }
- public static AddFixedState(int ballKey, Kinematics kinematics) { //ball color?..design...?
- }
- public static StopRecording() {
- }
- public static SaveRecording() {
- }
- public static LoadRecording() {
- }
- }
- /*
- recording:
- channel 1 recording events by frame number
- [
- size
- {
- event time
- event code
- event data {size is derivable,data}
- }
- ...
- ..
- until size = 0
- ]
- such as spawn or unspawn objects
- (for everything but balls, channel 2 holds information)
- (for balls, each ball that spawns has an incrementing ID in the recording)...this ID is alluded to in channel 4
- score changes
- something else
- .....
- channel 2
- frame[
- can do number of frames
- {
- timestamp,....any changes to item should come at the same time stamp...which means, the number of statics should be derivable
- statics per item
- }
- ]
- channel 3 ---when ball states end, ball is no longer rendered
- ball fixed states
- number of subChannels
- subChannels
- number of states
- time
- kinematic transform
- channel 4
- number of voices
- voices
- data size
- data stream
- positional data
- state count
- [
- {
- time
- position (direction?)
- }
- ]
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement