Exemple #1
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();
        }
Exemple #2
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);
     }
 }
        public static void Process()
        {
            if (IsSimulated)
            {
                return;
            }

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

            if (IsClient)
            {
                client.Tick();
            }
        }
Exemple #4
0
 // MonoBehaviour ///////////////////////////////////////////////////////
 public void LateUpdate() => client.Tick();