Esempio n. 1
0
        public static void HandleCordinatBilgileriniGonder(int connectionID, byte[] data)
        {
            Kaan_ByteBuffer buffer = new Kaan_ByteBuffer();

            buffer.Bytes_Yaz(data);
            int packetID = buffer.Int_Oku();

            //Oyuncu Pozisyonları
            float posx = buffer.Float_Oku();
            float posy = buffer.Float_Oku();
            float posz = buffer.Float_Oku();

            //Oyuncu Rotasyonlarımız
            float rotx = buffer.Float_Oku();
            float roty = buffer.Float_Oku();
            float rotz = buffer.Float_Oku();
            float rotw = buffer.Float_Oku();

            Sabitler.bagli_client[connectionID].xCord = posx;
            Sabitler.bagli_client[connectionID].yCord = posy;
            Sabitler.bagli_client[connectionID].zCord = posz;
            DataSender.SendKordinatBilgileriniGonder(connectionID, posx, posy, posz, rotx, roty, rotz, rotw);
            buffer.Dispose();
        }