public EntityMulti PlayerToMulti() { EntityMulti player = new EntityMulti(); player.Life = Life; player.Power = Power; player.Position = Position; player.Direction = Direction; return(player); }
public Client(string name, bool IsLocalClient) { this.IsLocalClient = IsLocalClient; serializer = new Polenter.Serialization.SharpSerializer(false); deserializer = new Polenter.Serialization.SharpSerializer(false); socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); entityMulti = new EntityMulti(); OtherPlayers = new List<EntityMulti>(); this.name = name; entityMulti.name = name; }
public ServeurClient(Socket socket, Serveur server) { this.socket = socket; this.server = server; stream = new NetworkStream(socket); streamReader = new StreamReader(stream); streamWriter = new StreamWriter(stream); serializer = new Polenter.Serialization.SharpSerializer(false); deserializer = new Polenter.Serialization.SharpSerializer(false); playerMul = new EntityMulti(); t_receive = new Thread(Receive); t_receive.Start(); }
public EntityMulti PlayerToMulti() { EntityMulti player = new EntityMulti(); player.Life = Life; player.Power = Power; player.Position = Position; player.Direction = Direction; return player; }