public void MovePlayer(MovePackage 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); } }
public void Move(List <Vector3> positions) { var package = new MovePackage(positions); Processor.Send(ServerConnection, package, DeliveryMethod.ReliableOrdered); }
public void MoveOther(MovePackage package) { Others[package.Id].AddToCache(package.Get()); }