Пример #1
0
 // 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);
 }
Пример #2
0
    public void StopRecording()
    {
        Debug.LogFormat("Finished recording {0} frames", actionCount);
        isRecording = false;
        Chronolabe labe = chronolabe;

        chronolabe = null;
        labe.AddGhost(CreateGhost());
    }
Пример #3
0
 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;
 }