ReplaySystem.Start C# (CSharp) Method

Start() private method

private Start ( ) : void
return void
    void Start()
    {
        rigidBody = GetComponent<Rigidbody> ();
        manager = GameObject.FindObjectOfType<GameManager> ();
    }

Usage Example

Exemplo n.º 1
0
 public void Start()
 {
     if (Started)
     {
         throw new Exception("KinectReplay already started");
     }
     Started = true;
     if (colorReplay != null)
     {
         colorReplay.Start(); colorReplay.FrameReady += frame => synchronizationContext.Send(state =>
         {
             if (ColorImageFrameReady != null)
             {
                 ColorImageFrameReady(this, new KinectRecorder.Replay.ToolBox.ReplayColorImageFrameReadyEventArgs {
                     ColorImageFrame = frame
                 });
             }
         }, null);
     }
     if (depthReplay != null)
     {
         depthReplay.Start(); depthReplay.FrameReady += frame => synchronizationContext.Send(state =>
         {
             if (DepthImageFrameReady != null)
             {
                 DepthImageFrameReady(this, new ToolBox.ReplayDepthImageFrameReadyEventArgs {
                     DepthImageFrame = frame
                 });
             }
         }, null);
     }
     if (skeletonReplay != null)
     {
         skeletonReplay.Start(); skeletonReplay.FrameReady += frame => synchronizationContext.Send(state =>
         {
             if (SkeletonFrameReady != null)
             {
                 SkeletonFrameReady(this, new ToolBox.ReplaySkeletonFrameReadyEventArgs {
                     SkeletonFrame = frame
                 });
             }
         }, null);
     }
 }