public void ReceivePacketPlayerPosition(PacketPlayerPosition ppp) { //Console.WriteLine("Packet received: "+ppp.FugamId.GameID); foreach (ClientHandler client in _clients) { if (!client.FugamId.Equals(ppp.FugamId)) { //Console.WriteLine("Send packet to: " + client.FugamId.GameID); ServerIO.Send(client.Client.GetStream(), ppp); } } }
public virtual void ResponePacketPlayerPosition(PacketPlayerPosition ppp) { }
public override void ResponePacketPlayerPosition(PacketPlayerPosition ppp) { foreach (Player p in _otherPlayers) { if (p.fid.Equals(ppp.FugamId)) { p.x = ppp.X; p.y = ppp.Y; break; } } }