示例#1
0
        public EntityMulti PlayerToMulti()
        {
            EntityMulti player = new EntityMulti();

            player.Life      = Life;
            player.Power     = Power;
            player.Position  = Position;
            player.Direction = Direction;
            return(player);
        }
示例#2
0
 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;
 }
示例#3
0
 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();
 }
示例#4
0
 public EntityMulti PlayerToMulti()
 {
     EntityMulti player = new EntityMulti();
     player.Life = Life;
     player.Power = Power;
     player.Position = Position;
     player.Direction = Direction;
     return player;
 }