/// <summary> /// 发送位置信息 /// </summary> private void SendPosSync() { Debug.Log("发送同步包"); var item = new PlayerStatePackClient(); item.angle_deg = current_Angle_deg; item.position = transform.position; item.speed = current_speed; item.CurrentTime = Time.time; ServerSample.GetInstance().SendPack(item); RecordLastSync(item); }
public void Start() { ServerSample.GetInstance().ReceivePack += ReceivePack; }