示例#1
0
        void Update()
        {
            CheckConnection();

            if (NodeInformation.type.Equals("master"))
            {
                InputMessage inputMessage = new InputMessage();

                TimeSynchronizer.BuildMessage(inputMessage.inputTimeMessage);
                InputSynchronizer.BuildMessage(this, inputMessage.inputInputMessage);
                ParticleSynchronizer.BuildMessage(inputMessage.inputParticleMessage);
                AnimatorSynchronizer.BuildMessage(inputMessage.inputAnimatorMessage);
                TrackingSynchronizer.BuildMessage(inputMessage.inputTrackingMessage);
                TransformationSynchronizer.BuildMessage(inputMessage.inputTransformationMessage);
                EventSynchronizer.BuildMessage(inputMessage.inputEventsMessage);

                node.BroadcastMessage(inputMessage);
            }
            else
            {
                InputMessage inputMessage = new InputMessage();
                ((Client)node).WaitForNextMessage(inputMessage);

                TimeSynchronizer.ProcessMessage(inputMessage.inputTimeMessage);
                InputSynchronizer.ProcessMessage(this, inputMessage.inputInputMessage);
                ParticleSynchronizer.ProcessMessage(inputMessage.inputParticleMessage);
                AnimatorSynchronizer.ProcessMessage(inputMessage.inputAnimatorMessage);
                TrackingSynchronizer.ProcessMessage(inputMessage.inputTrackingMessage);
                TransformationSynchronizer.ProcessMessage(inputMessage.inputTransformationMessage);
                EventSynchronizer.ProcessMessage(inputMessage.inputEventsMessage);
            }

            StartCoroutine(EndOfFrame());
        }
示例#2
0
文件: Server.cs 项目: cybort/CAVE
 void InitializeClient(ISocket connection)
 {
     ParticleSynchronizer.InitializeFromServer(this, connection);
     RandomSynchronizer.InitializeFromServer(this, connection);
 }
示例#3
0
文件: Client.cs 项目: cybort/CAVE
 void InitializeSelf()
 {
     ParticleSynchronizer.InitializeFromClient(this);
     RandomSynchronizer.InitializeFromClient(this);
 }