Ejemplo n.º 1
0
 void UpdateSeveralTimes()
 {
     // update serveral times to avoid flaky tests.
     // => need to update at 120 times for maxed sized message tests
     //    where it requires 120+ fragments
     for (int i = 0; i < 200; ++i)
     {
         client.Tick();
         server.Tick();
         // update 'interval' milliseconds.
         // the lower the interval, the faster the tests will run.
         Thread.Sleep((int)Interval);
     }
 }
Ejemplo n.º 2
0
        private void TickLoop()
        {
            server.Start((ushort)config.Port);

            while (listen)
            {
                server.Tick();
                TimeUtilities.HighPrecisionThreadSleep(1);
            }

            server.Stop();
        }
Ejemplo n.º 3
0
        // IMPORTANT: set script execution order to >1000 to call Transport's
        //            LateUpdate after all others. Fixes race condition where
        //            e.g. in uSurvival Transport would apply Cmds before
        //            ShoulderRotation.LateUpdate, resulting in projectile
        //            spawns at the point before shoulder rotation.
        public void LateUpdate()
        {
            // note: we need to check enabled in case we set it to false
            // when LateUpdate already started.
            // (https://github.com/vis2k/Mirror/pull/379)
            if (!enabled)
            {
                return;
            }

            server.Tick();
            client.Tick();
        }
Ejemplo n.º 4
0
        public static void Process()
        {
            if (IsSimulated)
            {
                return;
            }

            if (IsServer)
            {
                server.Tick();
            }

            if (IsClient)
            {
                client.Tick();
            }
        }
Ejemplo n.º 5
0
 public void LateUpdate() => server.Tick();