// Use this for initialization void Start() { audio = GetComponent <AudioSource> (); labe = GetComponentInParent <Chronolabe> (); EventManager.Instance.AddListener(Chronolabe.EVT_CHRONOLABE_REC_START, gameObject); EventManager.Instance.AddListener(Chronolabe.EVT_CHRONOLABE_REC_STOP, gameObject); }
public void StopRecording() { Debug.LogFormat("Finished recording {0} frames", actionCount); isRecording = false; Chronolabe labe = chronolabe; chronolabe = null; labe.AddGhost(CreateGhost()); }
public void StartRecording(int frames, Chronolabe labe) { Debug.LogFormat("Starting to record {0} frames", frames); chronolabe = labe; isRecording = true; actionCount = 0; frameActions = new PlayerFrameAction[frames]; transforms = new PlayerMovement[frames]; actions = new PlayerAction[frames]; spawnPoint = gameObject.transform.position; }