Esempio n. 1
0
 public void BootstrapNetCodeTestWorld()
 {
     using (var world = new NetCodeTestWorld())
     {
         world.Bootstrap(true, typeof(TestSystem));
         world.CreateWorlds(true);
         world.Tick(1000);
     }
 }
Esempio n. 2
0
        public void ConnectSingleClient()
        {
            using (var world = new NetCodeTestWorld())
            {
                world.Bootstrap(true, typeof(CheckConnectionSystem));
                world.CreateWorlds(true);

                CheckConnectionSystem.IsConnected = 0;
                if (CheckConnectionSystem.IsConnected != 3)
                {
                    world.Connect(16f / 1000f, 16);
                }

                Assert.AreEqual(3, CheckConnectionSystem.IsConnected);
                Debug.Log("NetId = " + world.TryGetSingleton <NetworkIdComponent>(world.ClientWorld).Value);
            }
        }