Beispiel #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());
        }
Beispiel #2
0
 void InitializeClient(ISocket connection)
 {
     ParticleSynchronizer.InitializeFromServer(this, connection);
     RandomSynchronizer.InitializeFromServer(this, connection);
 }
Beispiel #3
0
 void InitializeSelf()
 {
     ParticleSynchronizer.InitializeFromClient(this);
     RandomSynchronizer.InitializeFromClient(this);
 }