Example #1
0
        public UserTransformableGhost CreateGhost(UserTransformableRecordable target)
        {
            GameObject ghostObject = GameObject.Instantiate(target, target.transform.parent).gameObject;

            ghostObject.transform.localPosition = localPosition;
            ghostObject.transform.localRotation = localRotation;

            OutputText.instance.text = OutputText.instance.text + localPosition.ToString("F3") + localRotation.ToString("F3") + "\n";

            ghostObject.GetComponent <UserTransformableRecordable>().enabled = false;

            if (ghostObject.GetComponent <UserTransformableGhost>() == null)
            {
                ghostObject.AddComponent <UserTransformableGhost>();
            }
            OutputText.instance.text = OutputText.instance.text + "point1\n";
            UserTransformableGhost ghost = ghostObject.GetComponent <UserTransformableGhost>();

            ghost.enabled            = true;
            OutputText.instance.text = OutputText.instance.text + "point2\n";
            ghost.GhostifyRenderer();
            ghost.BindKeyframe(this);

            return(ghost);
        }
Example #2
0
 public UserTransformRecordEnvironment(UserTransformableRecordable target, string filename)
 {
     this.target = target;
     recording   = UserTransformableRecording.Load(filename);
     ghosts      = new List <UserTransformableGhost>();
     for (int i = 0; i < recording.keyframes.Count; i++)
     {
         ghosts.Add(recording.keyframes[i].CreateGhost(target));
         IncorporateGhost(i);
     }
 }
 public void StartLiveSession(UserTransformableRecordable target)
 {
     liveEnvironment = new UserTransformLiveEnvironment(target);
     InvokeRepeating("UpdateLiveSession", 0.0f, 0.1f);
 }
 public void LoadRecording(UserTransformableRecordable target, string filename)
 {
     recordEnvironment = new UserTransformRecordEnvironment(target, filename);
 }
 public void StartNewRecording(UserTransformableRecordable target)
 {
     recordEnvironment = new UserTransformRecordEnvironment(target);
 }
Example #6
0
 public UserTransformRecordEnvironment(UserTransformableRecordable target)
 {
     this.target = target;
     recording   = new UserTransformableRecording();
     ghosts      = new List <UserTransformableGhost>();
 }
 public UserTransformLiveEnvironment(UserTransformableRecordable target)
 {
     this.target = target;
 }