public void SynchronizationData(GameObject g, Gamobjectsinfo infomation) { BaseContol operatingObj = g.GetComponent <BaseContol>(); g.transform.position = new Vector3(infomation.x, infomation.y, infomation.z); operatingObj.setDirection(infomation.angle); operatingObj.frie(infomation.state[0]); }
public override void receiveDataHandel(int outConnectionId, byte[] buffer, int receivedSize, int MT) { obj = synchronizationObj["player" + outConnectionId]; Gamobjectsinfo clientInfo = (Gamobjectsinfo)BytesToOBJ(buffer); operatingObj = obj.GetComponent <BaseContol>(); obj.transform.position = new Vector3(clientInfo.x, clientInfo.y, clientInfo.z); operatingObj.setDirection(clientInfo.angle); // operatingObj.frie(clientInfo.state[0]); }
public void SynchronizationData(GameObject g, SerializeUDP infomation) { BaseContol operatingObj = g.GetComponent <BaseContol>(); // g.transform.position = new Vector3(infomation.x, infomation.y, infomation.z); operatingObj.setDirection(infomation.angle); if (!destinationList.ContainsKey(g)) { destinationList.Add(g, new Vector3(infomation.x, infomation.y, infomation.z)); } else { destinationList[g] = new Vector3(infomation.x, infomation.y, infomation.z); } // SyncPosition(g, new Vector3(infomation.x, infomation.y, infomation.z)); //operatingObj.frie(infomation.state[0]); abandoned operating }