Beispiel #1
0
        public void SimpleMovePlayer(SimpleMovePackage package, NetPeer sender)
        {
            for (var index = 0; index < Manager.ConnectedPeerList.Count; index++)
            {
                var p = Manager.ConnectedPeerList[index];

                if (p.Id == sender.Id)
                {
                    continue;
                }

                package.Id = sender.Id;
                Processor.Send(p, package, DeliveryMethod.ReliableOrdered);
            }
        }
Beispiel #2
0
        public void MoveSimple(Vector3 position)
        {
            var package = new SimpleMovePackage(position);

            Processor.Send(ServerConnection, package, DeliveryMethod.ReliableOrdered);
        }
Beispiel #3
0
 public void SimpleMoveOther(SimpleMovePackage package)
 {
     Others[package.Id].AddToCache(new Vector3(
                                       package.Position[0], package.Position[1], package.Position[2]));
 }