|
@@ -74,31 +74,47 @@ namespace GFGGame
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- // Texture2D tex = this.viewData as Texture2D;
|
|
|
- // byte[] bytes = tex.EncodeToJPG();//将纹理数据,转化成一个jpg图片
|
|
|
|
|
|
string[] rsp = await PoemPhotoSProxy.ReqTempPictureUrl((int)PictureType.jpg);
|
|
|
if (rsp == null) return;
|
|
|
|
|
|
- Timers.inst.StartCoroutine(PoemPhotoSProxy.PushToHWCloud(rsp[0], bytes, async () =>
|
|
|
+ bool pushResult = await PoemPhotoSProxy.PushToHWCloud(rsp[0], bytes);
|
|
|
+ if (!pushResult) return;
|
|
|
+
|
|
|
+ long addResult = await PoemPhotoSProxy.ReqAddTophoto(rsp[1], (int)PictureSourceType.PersonalAlbum);
|
|
|
+ if (addResult > 0)
|
|
|
{
|
|
|
- long result = await PoemPhotoSProxy.ReqAddTophoto(rsp[1], (int)PictureSourceType.PersonalAlbum);
|
|
|
+ List<PoemPhotoData> list = PoemPhotoDataManager.Instance.PersonalPhotoInfos;
|
|
|
|
|
|
- if (result > 0)
|
|
|
+ for (int i = 0; i < list.Count; i++)
|
|
|
{
|
|
|
- List<PoemPhotoData> list = PoemPhotoDataManager.Instance.PersonalPhotoInfos;
|
|
|
-
|
|
|
- for (int i = 0; i < list.Count; i++)
|
|
|
+ if (list[i].PictureId == addResult)
|
|
|
{
|
|
|
- if (list[i].PictureId == result)
|
|
|
- {
|
|
|
- list[i].Ntexture = new NTexture(tex);
|
|
|
+ list[i].Ntexture = new NTexture(tex);
|
|
|
|
|
|
- break;
|
|
|
- }
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
- }));
|
|
|
+ }
|
|
|
+ // Timers.inst.StartCoroutine(PoemPhotoSProxy.PushToHWCloud(rsp[0], bytes, async () =>
|
|
|
+ // {
|
|
|
+ // long result = await PoemPhotoSProxy.ReqAddTophoto(rsp[1], (int)PictureSourceType.PersonalAlbum);
|
|
|
+
|
|
|
+ // if (result > 0)
|
|
|
+ // {
|
|
|
+ // List<PoemPhotoData> list = PoemPhotoDataManager.Instance.PersonalPhotoInfos;
|
|
|
+
|
|
|
+ // for (int i = 0; i < list.Count; i++)
|
|
|
+ // {
|
|
|
+ // if (list[i].PictureId == result)
|
|
|
+ // {
|
|
|
+ // list[i].Ntexture = new NTexture(tex);
|
|
|
+
|
|
|
+ // break;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }));
|
|
|
|
|
|
}
|
|
|
}
|