Exemple #1
0
 void OnMyFrameAcknowledged(int frameIndex, int peerId)
 {
     // my peer has acknowledged the frame, so my
     // input is ready to be processed
     // make sure to set all frames prior to this one acknowledged too
     SimulationClock.SetReadyForFrame(frameIndex, MyPeerId, allPrior: true);
 }
Exemple #2
0
        //		protected int m_greatestFrameFromNetwork = -1;

        void OnReceivedFrameFromNetwork(int frameIndex, int peerId)
        {
            var simulationFrame = Network.GetSimulationFrame(frameIndex);

            Simulation.SetOrExtendFrame(frameIndex, simulationFrame);
            // I have received data from the peer
            SimulationClock.SetReadyForFrame(frameIndex, peerId);
        }