Exemplo n.º 1
0
        public void CallsRpc_OnOtherClient()
        {
            var entity1 = new NetworkEntity(0, _manager.Connection.LocalClient.ClientId);

            _manager.InstantiateEntity(entity1);

            var comp1 = new TestComponent
            {
                Id = 1
            };

            entity1.AddNetworkComponent(comp1);

            UpdateBoth();

            comp1.SendRpc();
            UpdateBoth();

            Assert.AreEqual(new TestComponent {
                A = 1, B = 2, C = "foo"
            }, _manager2.Entities[0].Components[0]);
        }