Browse Source

搭配赛补充提交

zhangyuqian 1 year ago
parent
commit
6679909dba
16 changed files with 694 additions and 118 deletions
  1. 254 62
      GameClient/Assets/Game/HotUpdate/Data/MatchingCompetitionDataManager.cs
  2. 127 0
      GameClient/Assets/Game/HotUpdate/Data/MatchingPhotoHelper.cs
  3. 11 0
      GameClient/Assets/Game/HotUpdate/Data/MatchingPhotoHelper.cs.meta
  4. 2 1
      GameClient/Assets/Game/HotUpdate/Data/PhotographSceneManager.cs
  5. 30 0
      GameClient/Assets/Game/HotUpdate/Data/VO/MatchingCompetitionData.cs
  6. 3 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/MatchingCompetition/UI_MatchingCompetitionDetailUI.cs
  7. 106 9
      GameClient/Assets/Game/HotUpdate/ServerProxy/MatchingCompetitionSproxy.cs
  8. 42 3
      GameClient/Assets/Game/HotUpdate/Views/DressUp/PhotographView.cs
  9. 35 7
      GameClient/Assets/Game/HotUpdate/Views/MatchingCompetition/MatchingCompetitionDetailView.cs
  10. 10 2
      GameClient/Assets/Game/HotUpdate/Views/MatchingCompetition/MatchingCompetitionGatheringView.cs
  11. 9 8
      GameClient/Assets/Game/HotUpdate/Views/MatchingCompetition/MatchingCompetitionRankView.cs
  12. 18 3
      GameClient/Assets/Game/HotUpdate/Views/MatchingCompetition/MatchingCompetitionSelectView.cs
  13. 28 21
      GameClient/Assets/Game/HotUpdate/Views/MatchingCompetition/MatchingCompetitionUpLoadView.cs
  14. 18 1
      GameClient/Assets/Game/HotUpdate/Views/MatchingCompetition/MatchingCompetitionWorkListView.cs
  15. 1 1
      GameClient/Assets/Game/HotUpdate/Views/MatchingCompetition/MatchingCompetitionWorksView.cs
  16. BIN
      GameClient/Assets/ResIn/UI/MatchingCompetition/MatchingCompetition_fui.bytes

+ 254 - 62
GameClient/Assets/Game/HotUpdate/Data/MatchingCompetitionDataManager.cs

@@ -19,10 +19,17 @@ namespace GFGGame
         //人物位置信息
         public TransformData roleTransFormData = new TransformData();
         public GameObject roleGameobj;
+        public int roleID = -1;
         //*********************搭配数据*********************************
         //需要传输的数据:MathingDressDate,DressUpBgID,DressPropIdList,TransformDataList,
         public DressUpData MathingDressDate = DressUpData.CreateDefault();
         public int DressUpBgID = 0;
+        //*****这两个id放列表的最后面
+        //边框id
+        public int BorderID = 0;
+        //NpcId
+        public int NpcID = 0;
+        //*************=**************
         //道具数据,一一对应
         //场景名字,自己搭配的数据
         public List<string> DressPropNameList = new List<string>();
@@ -30,55 +37,139 @@ namespace GFGGame
         public List<int> DressPropIdList = new List<int>();
         //道具位置信息
         public List<TransformData> TransformDataList = new List<TransformData>();
-
         public List<GameObject> itemGameObjs = new List<GameObject>();
-        public List<int> _equipSceneData = new List<int>();//当前穿戴的场景数据(从套装获得)
+
+        //所有信息的列表,用于前后端交互
+        public List<CollocationInfo> AllDressIDInfoList = new List<CollocationInfo>();
+        //public List<int> _equipSceneData = new List<int>();//当前穿戴的场景数据(从套装获得)
         //***************************************************************
 
         public int MatchingCompetitionSeason = 1;
+        public int MatchingState = 1;
+        public long MatchingEndTimes = 0;
+        public long WorksID = 0;
+        public string TempPictureUrl = "";
         public int MatchingRemainingTimes = 1;
         //本期排行榜数据
-        public List<MatchingPlayerData> _currentRankList = new List<MatchingPlayerData>() { new MatchingPlayerData()};
+        public List<MatchingPhotoWorksData> _currentRankList = new List<MatchingPhotoWorksData>();
+        //往期作品集
+        public List<MatchingWorksData> _BeforeWorksList = new List<MatchingWorksData>();
         //往期排行榜数据
-        public Dictionary<int, MatchingPlayerData> _beforeRankDic = new Dictionary<int, MatchingPlayerData>();
+        public List<MatchingPhotoWorksData> _BeforeRankList = new List<MatchingPhotoWorksData>();
 
         //根据时间判断:1:集结期 2:评选期  3;结算期
-        public int CheckCompetitionState()
+        //public int CheckCompetitionState()
+        //{
+        //    long currentTime = TimeHelper.ServerNow();
+        //    DateTime dateTime = DateTimeOffset.FromUnixTimeSeconds(currentTime).DateTime;
+        //    // 获取星期几
+        //    DayOfWeek dayOfWeek = dateTime.DayOfWeek;
+        //    int week = (int)dayOfWeek;
+        //    int hour = dateTime.Hour;
+        //    if(week == 0)
+        //    {
+        //        if(hour >= 21)
+        //        {
+        //            return 3;
+        //        }
+        //        else
+        //        {
+        //            return 2;
+        //        }
+        //    }
+        //    if(week <= 3 && week >= 1)
+        //    {
+        //        if(week == 3 && hour >= 5)
+        //        {
+        //            return 2;
+        //        }
+        //        if(week == 1 && hour < 5)
+        //        {
+        //            return 3;
+        //        }
+        //        return 1;
+        //    }
+        //    else if(week > 3 && week <= 6)
+        //    {
+        //        return 2;
+        //    }
+        //    return -1;
+        //}
+
+        public void ConvertInfoToList()
         {
-            long currentTime = TimeHelper.ServerNow();
-            DateTime dateTime = DateTimeOffset.FromUnixTimeSeconds(currentTime).DateTime;
-            // 获取星期几
-            DayOfWeek dayOfWeek = dateTime.DayOfWeek;
-            int week = (int)dayOfWeek;
-            int hour = dateTime.Hour;
-            if(week == 0)
+            //将所有需要存储的信息转换成list
+            AllDressIDInfoList.Clear();
+            foreach(var item in MathingDressDate.itemList)
             {
-                if(hour >= 21)
-                {
-                    return 3;
-                }
-                else
-                {
-                    return 2;
-                }
+                CollocationInfo itemInfo = new CollocationInfo();
+                itemInfo.ItemId = item;
+                itemInfo.ClientPosition = "";
+                AllDressIDInfoList.Add(itemInfo);
+            }
+            for(int i = 0;i< DressPropIdList.Count;i++)
+            {
+                CollocationInfo itemInfo = new CollocationInfo();
+                itemInfo.ItemId = DressPropIdList[i];
+                string transStr = TransformDataList[i].position.x.ToString() + TransformDataList[i].position.y.ToString() + TransformDataList[i].position.z.ToString()
+                   + TransformDataList[i].rotationZ.ToString() 
+                   + TransformDataList[i].scale.x.ToString()+ TransformDataList[i].scale.y.ToString() + TransformDataList[i].scale.z.ToString();
+                itemInfo.ClientPosition = transStr;
+                AllDressIDInfoList.Add(itemInfo);
             }
-            if(week <= 3 && week >= 1)
+        }
+        //解析后台获取的信息
+        public void AnalysisInfoToList()
+        {
+            List<int> dressitemIDList = new List<int>();
+            List<int> propIDList = new List<int>();
+            List<TransformData> transDataList = new List<TransformData>();
+            for (int i = 0; i < AllDressIDInfoList.Count; i++)
             {
-                if(week == 3 && hour >= 5)
+                if(AllDressIDInfoList[i].ItemId == roleID)
                 {
-                    return 2;
+                    propIDList.Add(AllDressIDInfoList[i].ItemId);
                 }
-                if(week == 1 && hour < 5)
+                else
                 {
-                    return 3;
+                    ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(AllDressIDInfoList[i].ItemId);
+                    if (itemCfg != null && itemCfg.itemType == ConstItemType.DRESS_UP)
+                    {
+                        if(itemCfg.subType == 9 || itemCfg.subType == 10 || itemCfg.subType == 11|| itemCfg.subType == 12)
+                        {
+                            //记录道具和位置信息
+                            propIDList.Add(AllDressIDInfoList[i].ItemId);
+                            transDataList.Add(AnalysisStringToTransform(AllDressIDInfoList[i].ClientPosition));
+                        }
+                        else
+                        {
+                            dressitemIDList.Add(AllDressIDInfoList[i].ItemId);
+                        }    
+                    }
+                    else if (itemCfg.itemType == ConstItemType.PHOTOGRAPH)
+                    {
+                        //记录道具和位置信息
+                        propIDList.Add(AllDressIDInfoList[i].ItemId);
+                        transDataList.Add(AnalysisStringToTransform(AllDressIDInfoList[i].ClientPosition));
+                    }
                 }
-                return 1;
             }
-            else if(week > 3 && week <= 6)
-            {
-                return 2;
-            }
-            return -1;
+            MathingDressDate.itemList = dressitemIDList;
+            DressPropIdList = propIDList;
+            TransformDataList = transDataList;
+        }
+        public TransformData AnalysisStringToTransform(string strTrans)
+        {
+            TransformData transData = new TransformData();
+            string[] parts = Regex.Split(strTrans, "_");
+            transData.position.x = float.Parse(parts[0]);
+            transData.position.y = float.Parse(parts[1]);
+            transData.position.z = float.Parse(parts[2]);
+            transData.rotationZ = float.Parse(parts[3]);
+            transData.scale.x = float.Parse(parts[4]);
+            transData.scale.y = float.Parse(parts[5]);
+            transData.scale.z = float.Parse(parts[6]);
+            return transData;
         }
         //存储道具信息
         public void SetTransformData()
@@ -113,56 +204,85 @@ namespace GFGGame
         public void SetNameToIdList()
         {
             DressPropIdList.Clear();
-            int flog_id = 0;
+            int flog_prefix = 0;
+            int flog_suffix = 0;
             for (int i = 0; i < DressPropNameList.Count; i++)
             {
                 bool containsUnderscore = Regex.IsMatch(DressPropNameList[i], "_");
                 if(!containsUnderscore)
                 {
-                    indexRoleData = i;
+                    if (DressPropNameList[i] == "Role")
+                    {
+                        DressPropIdList.Add(roleID);
+                    }
+                    else if (DressPropNameList[i] == "Border")
+                    {
+                        if (BorderID != 0)
+                        {
+                            DressPropIdList.Add(BorderID);
+                        }
+                    }
+                    else if (DressPropNameList[i] == "Npc")
+                    {
+                        if (NpcID != 0)
+                        {
+                            DressPropIdList.Add(NpcID);
+                        }
+                    }
                 }
                 else
                 {
                     // 使用正则表达式分割字符串
                     string[] parts = Regex.Split(DressPropNameList[i], "_");
                     int partID = int.Parse(parts[0]);
-                    if(flog_id == 3 && int.Parse(parts[1]) == 1)
+                    if(flog_prefix == int.Parse(parts[0]))
                     {
+                        if((flog_suffix == 3 && int.Parse(parts[1]) == 1)|| (flog_suffix == 1 && int.Parse(parts[1]) == 3))
+                        flog_prefix = 0;
+                        flog_suffix = 0;
                         continue;
                     }
-                    flog_id = int.Parse(parts[1]);   
+                    flog_prefix = int.Parse(parts[0]);
+                    flog_suffix = int.Parse(parts[1]);   
                     DressPropIdList.Add(partID);
                 }
             }
         }
         //将穿戴数据分类
-        public void ClassifyEquipData()
+        //public void ClassifyEquipData()
+        //{
+        //    _equipSceneData.Clear();
+        //    PhotographDataManager.Instance.dressUpObj = new DressUpObj();
+        //    //for (int i = 0; i < MathingDressDate.itemList.Count; i++)
+        //    //{
+        //    //    int itemId = MathingDressDate.itemList[i];
+        //    //    if (DressUpMenuItemCfg1Array.Instance.CheckIsSceneType(itemId, false))
+        //    //    {
+        //    //        if (!_equipSceneData.ContainsKey(itemId))
+        //    //        {
+        //    //            _equipSceneData.Add(itemId, new List<int>());
+        //    //        }
+        //    //        _equipSceneData[itemId].Add(itemId);
+        //    //    }
+        //    //}
+        //    for(int i =0;i<DressPropIdList.Count;i++)
+        //    {
+        //        int itemId = DressPropIdList[i];
+        //        if (DressUpMenuItemCfg1Array.Instance.CheckIsSceneType(itemId, false))
+        //        {
+        //            _equipSceneData.Add(itemId);
+        //        }
+        //    }
+        //}
+        public void InsertGameObjectList()
         {
-            _equipSceneData.Clear();
-            PhotographDataManager.Instance.dressUpObj = new DressUpObj();
-            //for (int i = 0; i < MathingDressDate.itemList.Count; i++)
-            //{
-            //    int itemId = MathingDressDate.itemList[i];
-            //    if (DressUpMenuItemCfg1Array.Instance.CheckIsSceneType(itemId, false))
-            //    {
-            //        if (!_equipSceneData.ContainsKey(itemId))
-            //        {
-            //            _equipSceneData.Add(itemId, new List<int>());
-            //        }
-            //        _equipSceneData[itemId].Add(itemId);
-            //    }
-            //}
-            for(int i =0;i<DressPropIdList.Count;i++)
+            for(int i=0;i< DressPropIdList.Count;i++)
             {
-                int itemId = DressPropIdList[i];
-                if (DressUpMenuItemCfg1Array.Instance.CheckIsSceneType(itemId, false))
+                if (DressPropIdList[i] == roleID)
                 {
-                    _equipSceneData.Add(itemId);
+                    indexRoleData = i;
                 }
             }
-        }
-        public void InsertGameObjectList()
-        {
             if(itemGameObjs.Count ==0)
             {
                 itemGameObjs.Add(roleGameobj);
@@ -264,26 +384,98 @@ namespace GFGGame
         }
     }
 
-    class OtherMatchingCompetitionDataManager : SingletonBase<OtherMatchingCompetitionDataManager>
+    class MatchingOneDataManager : SingletonBase<MatchingOneDataManager>
     {
         //其他玩家信息用于展示
+        public MatchingPhotoWorksData OneRoleInfo = new MatchingPhotoWorksData();
         //人物位置信息
         public TransformData roleTransFormData = new TransformData();
         public GameObject roleGameobj;
+        public int roleID = -1;
         //*********************搭配数据*********************************
         //需要传输的数据:MathingDressDate,DressUpBgID,DressPropIdList,TransformDataList,
         public DressUpData MathingDressDate = DressUpData.CreateDefault();
         public int DressUpBgID = 0;
+        //*****这两个id放列表的最后面
+        //边框id
+        public int BorderID = 0;
+        //NpcId
+        public int NpcID = 0;
         //道具数据,一一对应
-        //场景名字,自己搭配的数据
-        public List<string> DressPropNameList = new List<string>();
         //道具id
         public List<int> DressPropIdList = new List<int>();
         //道具位置信息
         public List<TransformData> TransformDataList = new List<TransformData>();
-
         public List<GameObject> itemGameObjs = new List<GameObject>();
-        public List<int> _equipSceneData = new List<int>();//当前穿戴的场景数据
         //***************************************************************
+        //解析后台获取的信息
+        public void AnalysisInfoToList()
+        {
+            List<int> dressitemIDList = new List<int>();
+            List<int> propIDList = new List<int>();
+            List<TransformData> transDataList = new List<TransformData>();
+            for (int i = 0; i < OneRoleInfo.JudgingInfo.CollocationInfoList.Count; i++)
+            {
+                if (OneRoleInfo.JudgingInfo.CollocationInfoList[i].ItemId == roleID)
+                {
+                    propIDList.Add(OneRoleInfo.JudgingInfo.CollocationInfoList[i].ItemId);
+                }
+                else
+                {
+                    ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(OneRoleInfo.JudgingInfo.CollocationInfoList[i].ItemId);
+                    if (itemCfg != null && itemCfg.itemType == ConstItemType.DRESS_UP)
+                    {
+                        if (itemCfg.subType == 9 || itemCfg.subType == 10 || itemCfg.subType == 11 || itemCfg.subType == 12)
+                        {
+                            //记录道具和位置信息
+                            propIDList.Add(OneRoleInfo.JudgingInfo.CollocationInfoList[i].ItemId);
+                            transDataList.Add(MatchingCompetitionDataManager.Instance.AnalysisStringToTransform(OneRoleInfo.JudgingInfo.CollocationInfoList[i].ClientPosition));
+                        }
+                        else
+                        {
+                            dressitemIDList.Add(OneRoleInfo.JudgingInfo.CollocationInfoList[i].ItemId);
+                        }
+                    }
+                    else if (itemCfg.itemType == ConstItemType.PHOTOGRAPH)
+                    {
+                        //记录道具和位置信息
+                        propIDList.Add(OneRoleInfo.JudgingInfo.CollocationInfoList[i].ItemId);
+                        transDataList.Add(MatchingCompetitionDataManager.Instance.AnalysisStringToTransform(OneRoleInfo.JudgingInfo.CollocationInfoList[i].ClientPosition));
+                    }
+                }
+            }
+            MathingDressDate.itemList = dressitemIDList;
+            MathingDressDate.actionId = OneRoleInfo.JudgingInfo.ActionId;
+            DressPropIdList = propIDList;
+            TransformDataList = transDataList;
+            DressUpBgID = OneRoleInfo.JudgingInfo.BagId;
+        }
+        public void InsertGameObjectList()
+        {
+            int indexRoleData = 0;
+            for (int i = 0; i < DressPropIdList.Count; i++)
+            {
+                if (DressPropIdList[i] == roleID)
+                {
+                    indexRoleData = i;
+                }
+            }
+            if (itemGameObjs.Count == 0)
+            {
+                itemGameObjs.Add(roleGameobj);
+            }
+            else
+            {
+                itemGameObjs.Insert(indexRoleData, roleGameobj);
+            }
+        }
+    }
+
+    class MatchingTwoDataManager : SingletonBase<MatchingTwoDataManager>
+    {
+        //其他玩家信息用于展示
+        public MatchingPhotoWorksData LeftRoleInfo = new MatchingPhotoWorksData();
+        //其他玩家信息用于展示
+        public MatchingPhotoWorksData RightRoleInfo = new MatchingPhotoWorksData();
     }
 }

+ 127 - 0
GameClient/Assets/Game/HotUpdate/Data/MatchingPhotoHelper.cs

@@ -0,0 +1,127 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.IO;
+using System.Net;
+using System.Net.Http;
+using System.Threading.Tasks;
+using ET;
+using FairyGUI;
+using UnityEngine;
+using UnityEngine.Networking;
+
+namespace GFGGame
+{
+    public static class MatchingPhotoHelper
+    {
+        //将图片上传到华为云
+        public static async Task<bool> PushToHWCloud(string signUrl, byte[] buffer)
+        {
+
+            HttpContent content = new ByteArrayContent(buffer);
+            HttpClient httpClient = new HttpClient(new HttpClientHandler() { UseCookies = false });
+            HttpResponseMessage response = await httpClient.PutAsync(signUrl, content);
+            response.EnsureSuccessStatusCode();
+            await response.Content.ReadAsStreamAsync();
+            if (response.StatusCode != HttpStatusCode.OK)
+            {
+                ViewManager.Hide<ModalStatusView>();
+                PromptController.Instance.ShowFloatTextPrompt("上传资源失败");
+                return false;
+            }
+            else
+            {
+                return true;
+            }
+
+        }
+
+
+        public static IEnumerator Download(List<MatchingPhotoWorksData> list)
+        {
+            for (int i = 0; i < list.Count; i++)
+            {
+                MatchingPhotoWorksData data = list[i];
+                if (data == null || data.Ntexture != null) continue;
+                int count = 0;
+                yield return DownloadPicture(data, count);
+            }
+            ET.Log.Debug("Download  finish!!!");
+            EventAgent.DispatchEvent(ConstMessage.DOWNLOAD_FINISH);
+        }
+        public static IEnumerator Download(List<MatchingWorksData> list)
+        {
+            for (int i = 0; i < list.Count; i++)
+            {
+                MatchingWorksData data = list[i];
+                if (data == null || data.Ntexture != null) continue;
+                int count = 0;
+                yield return DownloadPicture(data, count);
+            }
+            ET.Log.Debug("Download  finish!!!");
+            EventAgent.DispatchEvent(ConstMessage.DOWNLOAD_FINISH);
+        }
+        public static IEnumerator Download(MatchingPhotoWorksData list)
+        {
+                MatchingPhotoWorksData data = list;
+                yield return DownloadPicture(data, 1);
+            ET.Log.Debug("Download  finish!!!");
+            EventAgent.DispatchEvent(ConstMessage.DOWNLOAD_FINISH);
+        }
+
+        private static IEnumerator DownloadPicture(MatchingPhotoWorksData data, int count)
+        {
+            if (count >= 3)
+            {
+                PromptController.Instance.ShowFloatTextPrompt("下载失败");
+                ET.Log.Error("PoemPhotoData Download  failed!!! data:" + JsonUtility.ToJson(data));
+                data.Ntexture = null;
+                ViewManager.Hide<ModalStatusView>();
+                yield break;
+            }
+            using (UnityWebRequest request = UnityWebRequestTexture.GetTexture(data.JudgingInfo.PictureTempUrl))
+            {
+                yield return request.SendWebRequest();
+                if (request.result == UnityWebRequest.Result.ProtocolError || request.result == UnityWebRequest.Result.ConnectionError)
+                {
+                    ET.Log.Error("Download  failed, error code:" + request.result, ",data:" + JsonUtility.ToJson(data));
+                    count += 1;
+                    yield return DownloadPicture(data, count);
+                }
+                else
+                {
+                    Texture2D texture = (request.downloadHandler as DownloadHandlerTexture).texture;
+                    data.Ntexture = new NTexture(texture);
+                    data.Bytes = texture.EncodeToJPG();
+                }
+            }
+        }
+            private static IEnumerator DownloadPicture(MatchingWorksData data, int count)
+            {
+                if (count >= 3)
+                {
+                    PromptController.Instance.ShowFloatTextPrompt("下载失败");
+                    ET.Log.Error("PoemPhotoData Download  failed!!! data:" + JsonUtility.ToJson(data));
+                    data.Ntexture = null;
+                    ViewManager.Hide<ModalStatusView>();
+                    yield break;
+                }
+                using (UnityWebRequest request = UnityWebRequestTexture.GetTexture(data.WorksInfo.PictureTempUrl))
+                {
+                    yield return request.SendWebRequest();
+                    if (request.result == UnityWebRequest.Result.ProtocolError || request.result == UnityWebRequest.Result.ConnectionError)
+                    {
+                        ET.Log.Error("Download  failed, error code:" + request.result, ",data:" + JsonUtility.ToJson(data));
+                        count += 1;
+                        yield return DownloadPicture(data, count);
+                    }
+                    else
+                    {
+                        Texture2D texture = (request.downloadHandler as DownloadHandlerTexture).texture;
+                        data.Ntexture = new NTexture(texture);
+                        data.Bytes = texture.EncodeToJPG();
+                    }
+                }
+            }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/Data/MatchingPhotoHelper.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e2b8e8c1cd96fc04ba17eb83d7c4f2ab
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 2 - 1
GameClient/Assets/Game/HotUpdate/Data/PhotographSceneManager.cs

@@ -57,13 +57,13 @@ namespace GFGGame
             tf.localPosition = new Vector2(-spr.bounds.center.x, -spr.bounds.center.y);
             SetBoxCollider2DToGameObject(tf.gameObject);
             AddItemGameObjectToList(tf.parent.gameObject, true);
-
         }
         public void AddBodyItem()
         {
             GameObject bodyParent = sceneObject.transform.Find("Scene/Role").gameObject;
 
             MatchingCompetitionDataManager.Instance.roleGameobj = bodyParent;
+            MatchingOneDataManager.Instance.roleGameobj = bodyParent;
 
             UpdatePhotographBody(sceneObject, bodyParent);
             AddItemGameObjectToList(bodyParent, false);
@@ -72,6 +72,7 @@ namespace GFGGame
         public async Task AddSceneItem(GameObject parentGameObj, ItemCfg itemCfg, int layer, bool setLayer, bool isOnlyEff = false)
         {
             MatchingCompetitionDataManager.Instance.itemGameObjs.Add(parentGameObj);
+            MatchingOneDataManager.Instance.itemGameObjs.Add(parentGameObj);
 
             await AddItemToScene(sceneObject, parentGameObj, itemCfg.id, layer);
 

+ 30 - 0
GameClient/Assets/Game/HotUpdate/Data/VO/MatchingCompetitionData.cs

@@ -26,6 +26,10 @@ namespace GFGGame
         /// </summary>
         public int OtherPlayerPopularity = 100;
         /// <summary>
+        /// 个人相册_照片数据
+        /// </summary>
+        public byte[] Bytes;
+        /// <summary>
         /// 作品资源
         /// </summary>
         public NTexture Ntexture = null;
@@ -37,4 +41,30 @@ namespace GFGGame
         public float rotationZ = 0f;
         public Vector3 scale = new Vector3();
     }
+    //搭配赛作品信息
+    public class MatchingPhotoWorksData
+    {
+        public JudgingRoundRoleInfo JudgingInfo;
+        /// <summary>
+        /// 照片数据
+        /// </summary>
+        public byte[] Bytes;
+        /// <summary>
+        /// 照片资源
+        /// </summary>
+        public NTexture Ntexture;//个人相册数据
+    }
+    //搭配赛作品集信息
+    public class MatchingWorksData
+    {
+        public WorksCollectionInfo WorksInfo;
+        /// <summary>
+        /// 照片数据
+        /// </summary>
+        public byte[] Bytes;
+        /// <summary>
+        /// 照片资源
+        /// </summary>
+        public NTexture Ntexture;//个人相册数据
+    }
 }

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/MatchingCompetition/UI_MatchingCompetitionDetailUI.cs

@@ -7,6 +7,7 @@ namespace UI.MatchingCompetition
     public partial class UI_MatchingCompetitionDetailUI
     {
         public GComponent target;
+        public GLoader m_btn;
         public GButton m_BtnBack;
         public GList m_nameList;
         public GList m_dressList;
@@ -57,12 +58,14 @@ namespace UI.MatchingCompetition
 
         private void Init(GComponent comp)
         {
+            m_btn = (GLoader)comp.GetChild("btn");
             m_BtnBack = (GButton)comp.GetChild("BtnBack");
             m_nameList = (GList)comp.GetChild("nameList");
             m_dressList = (GList)comp.GetChild("dressList");
         }
         public void Dispose(bool disposeTarget = false)
         {
+            m_btn = null;
             m_BtnBack = null;
             m_nameList = null;
             m_dressList = null;

+ 106 - 9
GameClient/Assets/Game/HotUpdate/ServerProxy/MatchingCompetitionSproxy.cs

@@ -1,24 +1,121 @@
 using ET;
+using FairyGUI;
+using UnityEngine;
+using UnityEngine.Networking;
 
 namespace GFGGame
 {
     public class MatchingCompetitionSproxy
     {
-        //获取搭配评选赛搭配数据,道具数据,人物位置数据
-        public static async ETTask<bool> ReqMatchingCompetitionDressData(int roleID)
+        //获取搭配评选赛信息
+        public static async ETTask<bool> ReqMatchingCompetitionInfo()
         {
-            //C2S_GetDay7Reward
-            var response = await MessageHelper.SendToServer(new C2S_GetDay7Reward { Id = roleID });
+            S2C_GetJudgingRoundInfo response = (S2C_GetJudgingRoundInfo)await MessageHelper.SendToServer(new C2S_GetJudgingRoundInfo { });
             if (!(response is { Error: ErrorCode.ERR_Success })) return false;
-            DressUpData data = null;
-            if (data == null)
+            MatchingCompetitionDataManager.Instance.MatchingCompetitionSeason = response.JudgingRoundOpenId;
+            MatchingCompetitionDataManager.Instance.MatchingState = response.PhaseType;
+            MatchingCompetitionDataManager.Instance.MatchingEndTimes = response.PhaseEndTime;
+            return true;
+        }
+        //获取搭配作品信息
+        public static async ETTask<bool> ReqMatchingCompetitionDressData()
+        {
+            var response = (S2C_RequestUpLoadJudgingRoundWorks)await MessageHelper.SendToServer(new C2S_RequestUpLoadJudgingRoundWorks {});
+            if (!(response is { Error: ErrorCode.ERR_Success })) return false;
+            return true;
+        }
+        //获取一个热门推荐的玩家
+        public static async ETTask<bool> ReqGetOnePlayers()
+        {
+            var response = (S2C_GetOnePlayers)await MessageHelper.SendToServer(new C2S_GetOnePlayers { });
+            if (!(response is { Error: ErrorCode.ERR_Success })) return false;
+            MatchingOneDataManager.Instance.OneRoleInfo.JudgingInfo = response.JudgingRoundRole;
+            Timers.inst.StartCoroutine(MatchingPhotoHelper.Download(MatchingOneDataManager.Instance.OneRoleInfo));
+            MatchingOneDataManager.Instance.AnalysisInfoToList();
+            return true;
+        }
+        //上传作品信息
+        public static async ETTask<bool> UpLoadMatchingCompetitionDressData()
+        {
+            var response = (S2C_RequestUpLoadJudgingRoundWorks)await MessageHelper.SendToServer(new C2S_RequestUpLoadJudgingRoundWorks
+            {
+                PictureType = 1,
+                BagId = MatchingCompetitionDataManager.Instance.DressUpBgID,
+                ActionId = MatchingCompetitionDataManager.Instance.MathingDressDate.actionId,
+                CollocationInfoList = MatchingCompetitionDataManager.Instance.AllDressIDInfoList
+            });
+            if (!(response is { Error: ErrorCode.ERR_Success })) return false;
+            MatchingCompetitionDataManager.Instance.WorksID = response.WorksId;
+            MatchingCompetitionDataManager.Instance.TempPictureUrl = response.TempPictureUrl;
+            return true;
+        }
+        //通知服务端上传成功
+        public static async ETTask<bool> UploadSuccess()
+        {
+            var response = (S2C_NoticeJudgingRoundWorksUploaded)await MessageHelper.SendToServer(new C2S_NoticeJudgingRoundWorksUploaded
             {
-                MatchingCompetitionDataManager.Instance.MathingDressDate = DressUpData.CreateDefault();
+                WorksId = MatchingCompetitionDataManager.Instance.WorksID
+            }) ;
+            if (!(response is { Error: ErrorCode.ERR_Success })) return false;
+
+            return true;
+        }
+
+        //获取两个评选推荐的玩家
+        public static async ETTask<bool> ReqGetTwoPlayers()
+        {
+            var response = (S2C_GetTwoPlayers)await MessageHelper.SendToServer(new C2S_GetTwoPlayers { });
+            if (!(response is { Error: ErrorCode.ERR_Success })) return false;
+            MatchingTwoDataManager.Instance.LeftRoleInfo.JudgingInfo = response.JudgingRoundRoleInfokList[0];
+            Timers.inst.StartCoroutine(MatchingPhotoHelper.Download(MatchingTwoDataManager.Instance.LeftRoleInfo));
+            MatchingTwoDataManager.Instance.RightRoleInfo.JudgingInfo = response.JudgingRoundRoleInfokList[1];
+            Timers.inst.StartCoroutine(MatchingPhotoHelper.Download(MatchingTwoDataManager.Instance.RightRoleInfo));
+            return true;
+        }
+
+        //获取当前排行榜
+        public static async ETTask<bool> ReqCurrentRank()
+        {
+            var response = (S2C_GetCurJudgingRoundRankList)await MessageHelper.SendToServer(new C2S_GetCurJudgingRoundRankList { });
+            if (!(response is { Error: ErrorCode.ERR_Success })) return false;
+            MatchingCompetitionDataManager.Instance._currentRankList.Clear();
+            foreach (var item in response.JudgingRoundRoleInfokList)
+            {
+                MatchingPhotoWorksData data = new MatchingPhotoWorksData();
+                data.JudgingInfo = item;
+                MatchingCompetitionDataManager.Instance._currentRankList.Add(data);
             }
-            else 
+            Timers.inst.StartCoroutine(MatchingPhotoHelper.Download(MatchingCompetitionDataManager.Instance._currentRankList));
+            return true;
+        }
+        //获取往期作品集
+        public static async ETTask<bool> ReqBeforeWorks()
+        {
+            var response = (S2C_GetPreviousWorksCollection)await MessageHelper.SendToServer(new C2S_GetPreviousWorksCollection { });
+            if (!(response is { Error: ErrorCode.ERR_Success })) return false;
+            MatchingCompetitionDataManager.Instance._BeforeWorksList.Clear();
+            foreach (var item in response.WorksCollectionList)
+            {
+                MatchingWorksData data = new MatchingWorksData();
+                data.WorksInfo = item;
+                MatchingCompetitionDataManager.Instance._BeforeWorksList.Add(data);
+            }
+            Timers.inst.StartCoroutine(MatchingPhotoHelper.Download(MatchingCompetitionDataManager.Instance._BeforeWorksList));
+            return true;
+        }
+        //获取往期作品排行榜
+        public static async ETTask<bool> ReqBeforeRank(int id)
+        {
+            var response = (S2C_GetOldJudgingRoundRankList)await MessageHelper.SendToServer(new C2S_GetOldJudgingRoundRankList { JudgingRoundOpenId = id});
+            if (!(response is { Error: ErrorCode.ERR_Success })) return false;
+            MatchingCompetitionDataManager.Instance._BeforeRankList.Clear();
+            foreach (var item in response.JudgingRoundRoleInfokList)
             {
-                MatchingCompetitionDataManager.Instance.MathingDressDate = data;
+                MatchingPhotoWorksData data = new MatchingPhotoWorksData();
+                data.JudgingInfo = item;
+                MatchingCompetitionDataManager.Instance._BeforeRankList.Add(data);
             }
+            Timers.inst.StartCoroutine(MatchingPhotoHelper.Download(MatchingCompetitionDataManager.Instance._BeforeRankList));
             return true;
         }
     }

+ 42 - 3
GameClient/Assets/Game/HotUpdate/Views/DressUp/PhotographView.cs

@@ -268,11 +268,19 @@ namespace GFGGame
                     break;
 
                 case EnumPhotographType.BORDER:
+                    if (itemCfg.id != ConstItemID.BORDERID)
+                    {
+                        MatchingCompetitionDataManager.Instance.BorderID = itemCfg.id;
+                    }
+                    else
+                    {
+                        MatchingCompetitionDataManager.Instance.BorderID = 0;
+                    }  
                     PhotographSceneManager.Instance.AddBorderItem(itemCfg);
                     break;
 
                 case EnumPhotographType.NPC:
-
+                    MatchingCompetitionDataManager.Instance.NpcID = itemCfg.id;
                     PhotographSceneManager.Instance.AddNpcItem(itemCfg);
                     break;
 
@@ -304,14 +312,25 @@ namespace GFGGame
                 //对搭配赛特殊处理
                 for (int i = 0; i < MatchingCompetitionDataManager.Instance.DressPropIdList.Count; i++)
                 {
-                    if(MatchingCompetitionDataManager.Instance.DressPropIdList[i] == 0)
+                    if(MatchingCompetitionDataManager.Instance.DressPropIdList[i] == MatchingCompetitionDataManager.Instance.roleID)
                     {
                         continue;
                     }
                     else
                     {
                         ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(MatchingCompetitionDataManager.Instance.DressPropIdList[i]);
-                        AddSceneItem(itemCfg, true);                    
+                        if (itemCfg.itemType == ConstItemType.PHOTOGRAPH && itemCfg.subType == ConstItemSubType.PHOTOGRAPH_BOREDR)
+                        {
+                            PhotographSceneManager.Instance.AddBorderItem(itemCfg);
+                        }
+                        else if(itemCfg.itemType == ConstItemType.PHOTOGRAPH && itemCfg.subType == ConstItemSubType.PHOTOGRAPH_NPC)
+                        {
+                            PhotographSceneManager.Instance.AddNpcItem(itemCfg);
+                        }
+                        else
+                        {
+                            AddSceneItem(itemCfg, true);
+                        }                
                     }
                 }
 
@@ -321,6 +340,16 @@ namespace GFGGame
         {
             //int time = 5 * (MatchingCompetitionDataManager.Instance.TransformDataList.Count+1);
             await Task.Delay(100);
+            if (MatchingCompetitionDataManager.Instance.BorderID != 0)
+            {
+                GameObject borderGameObj = PhotographSceneManager.Instance.sceneObject.transform.Find("Border").gameObject;
+                MatchingCompetitionDataManager.Instance.itemGameObjs.Add(borderGameObj);
+            }
+            if (MatchingCompetitionDataManager.Instance.NpcID != 0)
+            {
+                GameObject NpcGameObj = PhotographSceneManager.Instance.sceneObject.transform.Find("Scene/Npc").gameObject;
+                MatchingCompetitionDataManager.Instance.itemGameObjs.Add(NpcGameObj);
+            }
             MatchingCompetitionDataManager.Instance.InsertGameObjectList();
             for (int i = 0; i < MatchingCompetitionDataManager.Instance.TransformDataList.Count; i++)
             {
@@ -711,6 +740,16 @@ namespace GFGGame
             else if (_ui.m_c1.selectedIndex == 2)
             {
                 MatchingCompetitionDataManager.Instance.itemGameObjs = _itemGameObjs.ToList();
+                if(MatchingCompetitionDataManager.Instance.BorderID != 0)
+                {
+                    GameObject borderGameObj = PhotographSceneManager.Instance.sceneObject.transform.Find("Border").gameObject;
+                    MatchingCompetitionDataManager.Instance.itemGameObjs.Add(borderGameObj);
+                }
+                if(MatchingCompetitionDataManager.Instance.NpcID != 0)
+                {
+                    GameObject NpcGameObj = PhotographSceneManager.Instance.sceneObject.transform.Find("Scene/Npc").gameObject;
+                    MatchingCompetitionDataManager.Instance.itemGameObjs.Add(NpcGameObj);
+                }
                 MatchingCompetitionDataManager.Instance.MathingDressDate = MyDressUpHelper.dressUpObj.DressUpDataClone();
                 MatchingCompetitionDataManager.Instance.SetTransformData();
                 AlertUI.Show("作品已保存,是否确认上传此作品?")

+ 35 - 7
GameClient/Assets/Game/HotUpdate/Views/MatchingCompetition/MatchingCompetitionDetailView.cs

@@ -12,7 +12,9 @@ namespace GFGGame
     {
         private UI_MatchingCompetitionDetailUI _ui;
         private GameObject _sceneObject;
-        private int _seasonIndex = 0;
+        private int nameIndex = 0;
+        private List<string> nameList = new List<string>() { "饰品","外套","鞋子","袜子","内搭","上衣","下装","手持物","妆容","道具","背景","拍照" };
+        private List<int> IdList = new List<int>();
         public override void Dispose()
         {
             if (_sceneObject != null)
@@ -37,9 +39,10 @@ namespace GFGGame
             isReturnView = true;
             isfullScreen = true;
 
+            _ui.m_nameList.itemRenderer = ListItemType1Renderer;
+            _ui.m_dressList.itemRenderer = ListItemType2Render;
             _ui.m_BtnBack.onClick.Add(OnClickBtnBack);
-            _ui.m_nameList.onClickItem.Add(OnClickListType1Item);
-            _ui.m_dressList.onClickItem.Add(OnClickListType2Item);
+            _ui.m_btn.onClick.Add(OnClickBtn);
         }
         protected override void AddEventListener()
         {
@@ -100,7 +103,7 @@ namespace GFGGame
                 //对搭配赛特殊处理
                 for (int i = 0; i < MatchingCompetitionDataManager.Instance.DressPropIdList.Count; i++)
                 {
-                    if (MatchingCompetitionDataManager.Instance.DressPropIdList[i] == 0)
+                    if (MatchingCompetitionDataManager.Instance.DressPropIdList[i] == MatchingCompetitionDataManager.Instance.roleID)
                     {
                         continue;
                     }
@@ -122,14 +125,39 @@ namespace GFGGame
                     PhotographUtil.Instance.ChangeLayer(MatchingCompetitionDataManager.Instance.itemGameObjs[i], i * PhotographDataManager.layerCount, "up");
                 }
         }
+        private void ListItemType1Renderer(int index, GObject obj)
+        {
+            UI_ComponentName item = UI_ComponentName.Proxy(obj);
+            item.m_name.text = nameList[index];
+            if (item.target.data == null)
+            {
+                item.target.onClick.Add(OnClickListType1Item);
+            }
+            item.target.data = index;
+            UI_ComponentName.ProxyEnd();
+        }
+        private void ListItemType2Render(int index, GObject obj)
+        {
+            UI_MatchingDressItem item = UI_MatchingDressItem.Proxy(obj);
+            ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(IdList[index]);
+            item.m_icon.url = ResPathUtil.GetIconPath(itemCfg.res, "png");
+            item.m_txtTitle.text = itemCfg.name;
+            UI_MatchingDressItem.ProxyEnd();
+        }
         private void OnClickListType1Item(EventContext context)
         {
-            
+            GObject item = context.sender as GObject;
+            int index = (int)item.data;
+            nameIndex = index;
+            _ui.m_dressList.numItems = IdList.Count;
+            _ui.m_dressList.visible = true;
+            _ui.m_nameList.visible = false;
         }
 
-        private void OnClickListType2Item(EventContext context)
+        private void OnClickBtn(EventContext context)
         {
-            
+            _ui.m_nameList.visible = true;
+            _ui.m_dressList.visible = false;
         }
 
         private void OnClickBtnBack()

+ 10 - 2
GameClient/Assets/Game/HotUpdate/Views/MatchingCompetition/MatchingCompetitionGatheringView.cs

@@ -58,7 +58,7 @@ namespace GFGGame
             _ui.m_c1.selectedIndex = 0;
             SuitID = 201030;
             UpdateView();
-            Timers.inst.AddUpdate(UpdateTime);
+            //Timers.inst.AddUpdate(UpdateTime);
         }
 
         protected override void OnHide()
@@ -96,7 +96,15 @@ namespace GFGGame
         }
         private void UpdateTime(object param = null)
         {
-
+            long endTime = MatchingCompetitionDataManager.Instance.MatchingEndTimes;
+            long curTime = TimeHelper.ServerNow();
+            if (endTime < curTime + 1)
+            {
+                Timers.inst.Remove(UpdateTime);
+                return;
+            }
+            TimeUtil.FormattingTime(curTime, endTime, out int num, out string str);
+            _ui.m_timeText.text = "评选剩余时间:" + TimeUtil.FormattingTimeTo_DDHHmm(endTime - curTime);
         }
         private void OnClickBtnBack()
         {

+ 9 - 8
GameClient/Assets/Game/HotUpdate/Views/MatchingCompetition/MatchingCompetitionRankView.cs

@@ -59,7 +59,7 @@ namespace GFGGame
         }
         private void UpdateView()
         {
-            MatchingPlayerData otherInfo = MatchingCompetitionDataManager.Instance._currentRankList[0];
+            MatchingPhotoWorksData otherInfo = MatchingCompetitionDataManager.Instance._currentRankList[0];
             _ui.m_playerImage.texture = otherInfo.Ntexture;
             _currentIndex = 0;
             _ui.m_RankList.numItems = MatchingCompetitionDataManager.Instance._currentRankList.Count;
@@ -75,11 +75,12 @@ namespace GFGGame
         private void RenderRankList(int index, GObject obj)
         {
             UI_Component3 item = UI_Component3.Proxy(obj);
-            MatchingPlayerData otherInfo = new MatchingPlayerData();
+            MatchingPhotoWorksData otherdata = MatchingCompetitionDataManager.Instance._currentRankList[index];
+            JudgingRoundRoleInfo otherInfo = otherdata.JudgingInfo;
             otherInfo.Rank = index;
-            RoleInfoManager.Instance.UpdateHead(item.m_head, otherInfo.HeadId, otherInfo.HeadBorderId);
-            item.m_nameText.text = otherInfo.OtherPlayerName.ToString();
-            item.m_countText.text = otherInfo.OtherPlayerPopularity.ToString();
+            RoleInfoManager.Instance.UpdateHead(item.m_head, otherInfo.HeadItemId, otherInfo.HeadBorderItemId);
+            item.m_nameText.text = otherInfo.RoleName.ToString();
+            item.m_countText.text = otherInfo.Score.ToString();
             MatchingCompetitionDataManager.Instance.SetNumToRank(otherInfo.Rank, item.m_RankIndex);
             if(item.target.data == null)
             {
@@ -91,9 +92,9 @@ namespace GFGGame
         private void OnClickBtnItem(EventContext context)
         {
             GObject item = context.sender as GObject;
-            int index = (int)item.data;
-            _currentIndex = index; 
-            MatchingPlayerData otherInfo = MatchingCompetitionDataManager.Instance._currentRankList[index];
+            int index = (int)item.data; 
+            _currentIndex = index;
+            MatchingPhotoWorksData otherInfo = MatchingCompetitionDataManager.Instance._currentRankList[index];
             _ui.m_playerImage.texture = otherInfo.Ntexture;
         }
         private void OnClickBtnBack()

+ 18 - 3
GameClient/Assets/Game/HotUpdate/Views/MatchingCompetition/MatchingCompetitionSelectView.cs

@@ -11,6 +11,7 @@ namespace GFGGame
     {
         private UI_MatchingCompetitionSelectUI _ui;
         private int _seasonIndex = 0;
+        private bool isRefresh = false;
         public override void Dispose()
         {
             if (_ui != null)
@@ -44,8 +45,9 @@ namespace GFGGame
             base.OnShown();
             _ui.m_bg.url = ResPathUtil.GetBgImgPath("gzs_fb_bj");
             _ui.m_BtnBack.touchable = true;
-
+            isRefresh = (bool)this.viewData;
             UpdateView();
+            UpdatePlayer();
         }
 
         protected override void OnHide()
@@ -57,10 +59,21 @@ namespace GFGGame
         {
             base.RemoveEventListener();
         }
+        private void UpdatePlayer()
+        {
+            _ui.m_playerShow1.m_playerImage.m_playerImage.texture = MatchingTwoDataManager.Instance.LeftRoleInfo.Ntexture;
+            _ui.m_playerShow2.m_playerImage.m_playerImage.texture = MatchingTwoDataManager.Instance.RightRoleInfo.Ntexture;
+            MatchingPhotoWorksData otherLeftdata = MatchingTwoDataManager.Instance.LeftRoleInfo;
+            JudgingRoundRoleInfo otherInfo = otherLeftdata.JudgingInfo;
+            RoleInfoManager.Instance.UpdateHead(_ui.m_player1.m_head, otherInfo.HeadItemId, otherInfo.HeadBorderItemId);
+            _ui.m_player1.m_nameText.text = otherInfo.RoleName.ToString();
+            MatchingPhotoWorksData otherRightdata = MatchingTwoDataManager.Instance.RightRoleInfo;
+            JudgingRoundRoleInfo otherRightInfo = otherRightdata.JudgingInfo;
+            RoleInfoManager.Instance.UpdateHead(_ui.m_player2.m_head, otherRightInfo.HeadItemId, otherRightInfo.HeadBorderItemId);
+            _ui.m_player2.m_nameText.text = otherInfo.RoleName.ToString();
+        }
         private void UpdateView()
         {
-            _ui.m_playerShow1.m_playerImage.m_playerImage.texture = null;
-            _ui.m_playerShow2.m_playerImage.m_playerImage.texture = null;
             _ui.m_selectText1.alpha = 0;
             _ui.m_selectText2.alpha = 0;
             _ui.m_timeText.text = string.Format("剩余次数:{0}", MatchingCompetitionDataManager.Instance.MatchingRemainingTimes);
@@ -74,6 +87,7 @@ namespace GFGGame
         {
             if(MatchingCompetitionDataManager.Instance.MatchingRemainingTimes<=0)
             {
+                PromptController.Instance.ShowFloatTextPrompt("评选次数不足");
                 return;
             }
             _ui.m_select1.m_c1.selectedIndex = 1;
@@ -85,6 +99,7 @@ namespace GFGGame
         {
             if (MatchingCompetitionDataManager.Instance.MatchingRemainingTimes <= 0)
             {
+                PromptController.Instance.ShowFloatTextPrompt("评选次数不足");
                 return;
             }
             _ui.m_select2.m_c1.selectedIndex = 1;

+ 28 - 21
GameClient/Assets/Game/HotUpdate/Views/MatchingCompetition/MatchingCompetitionUpLoadView.cs

@@ -61,7 +61,7 @@ namespace GFGGame
             UpdateView();
             UpdateHead();
             UpdateDress();
-            Timers.inst.AddUpdate(UpdateTime);
+            //Timers.inst.AddUpdate(UpdateTime);
         }
 
         protected override void OnHide()
@@ -83,34 +83,34 @@ namespace GFGGame
         private async void UpdateDress()
         {
             //这里要换成获取其他玩家数据
-            if (MatchingCompetitionDataManager.Instance.MathingDressDate.actionId != 0)
+            if (MatchingOneDataManager.Instance.MathingDressDate.actionId != 0)
             {
                 _ui.m_bg.visible = false;
                 _ui.m_playerImage.visible = false;
-                MatchingCompetitionDataManager.Instance.itemGameObjs.Clear();
+                MatchingOneDataManager.Instance.itemGameObjs.Clear();
                 PhotographDataManager.Instance.itemGameObjs.Clear();
                 if (_sceneObject == null)
                 {
                     _sceneObject = PrefabManager.Instance.InstantiateSync(ResPathUtil.GetPrefabPath("ScenePhotograph"));
                 }
                 PhotographSceneManager.Instance.sceneObject = _sceneObject;
-                if(MatchingCompetitionDataManager.Instance.DressUpBgID == 0)
+                if(MatchingOneDataManager.Instance.DressUpBgID == 0)
                 {
                     PhotographSceneManager.Instance.AddBgItem(ItemCfgArray.Instance.GetCfg(180001));
                 }
                 else
                 {
-                    PhotographSceneManager.Instance.AddBgItem(ItemCfgArray.Instance.GetCfg(MatchingCompetitionDataManager.Instance.DressUpBgID));
+                    PhotographSceneManager.Instance.AddBgItem(ItemCfgArray.Instance.GetCfg(MatchingOneDataManager.Instance.DressUpBgID));
                 }
                 PhotographSceneManager.Instance.AddBodyItem();
                 GameObject bodyParent = _sceneObject.transform.Find("Scene/Role").gameObject;
                 PhotographDataManager.Instance.dressUpObj.setSceneObj(_sceneObject, false, true, bodyParent, false, null);
-                PhotographDataManager.Instance.dressUpObj.PutOnDressUpData(MatchingCompetitionDataManager.Instance.MathingDressDate);
+                PhotographDataManager.Instance.dressUpObj.PutOnDressUpData(MatchingOneDataManager.Instance.MathingDressDate);
                 
                 //对搭配赛特殊处理
-                for (int i = 0; i < MatchingCompetitionDataManager.Instance.DressPropIdList.Count; i++)
+                for (int i = 0; i < MatchingOneDataManager.Instance.DressPropIdList.Count; i++)
                 {
-                    if (MatchingCompetitionDataManager.Instance.DressPropIdList[i] == 0)
+                    if (MatchingOneDataManager.Instance.DressPropIdList[i] == MatchingOneDataManager.Instance.roleID)
                     {
                         continue;
                     }
@@ -121,15 +121,15 @@ namespace GFGGame
                     }
                 }
                 await Task.Delay(100);
-                MatchingCompetitionDataManager.Instance.InsertGameObjectList();
-                for (int i = 0; i < MatchingCompetitionDataManager.Instance.TransformDataList.Count; i++)
+                MatchingOneDataManager.Instance.InsertGameObjectList();
+                for (int i = 0; i < MatchingOneDataManager.Instance.TransformDataList.Count; i++)
                 {
-                    TransformData itemdata = MatchingCompetitionDataManager.Instance.TransformDataList[i];
-                    GameObject itemGObj = MatchingCompetitionDataManager.Instance.itemGameObjs[i];
-                    MatchingCompetitionDataManager.Instance.itemGameObjs[i].transform.position = itemdata.position;
-                    MatchingCompetitionDataManager.Instance.itemGameObjs[i].transform.Rotate(itemGObj.transform.eulerAngles.x, itemGObj.transform.eulerAngles.y, itemdata.rotationZ);
-                    MatchingCompetitionDataManager.Instance.itemGameObjs[i].transform.localScale = itemdata.scale;
-                    PhotographUtil.Instance.ChangeLayer(MatchingCompetitionDataManager.Instance.itemGameObjs[i], i * PhotographDataManager.layerCount, "up");
+                    TransformData itemdata = MatchingOneDataManager.Instance.TransformDataList[i];
+                    GameObject itemGObj = MatchingOneDataManager.Instance.itemGameObjs[i];
+                    MatchingOneDataManager.Instance.itemGameObjs[i].transform.position = itemdata.position;
+                    MatchingOneDataManager.Instance.itemGameObjs[i].transform.Rotate(itemGObj.transform.eulerAngles.x, itemGObj.transform.eulerAngles.y, itemdata.rotationZ);
+                    MatchingOneDataManager.Instance.itemGameObjs[i].transform.localScale = itemdata.scale;
+                    PhotographUtil.Instance.ChangeLayer(MatchingOneDataManager.Instance.itemGameObjs[i], i * PhotographDataManager.layerCount, "up");
                 }
             }
             else
@@ -146,14 +146,21 @@ namespace GFGGame
         }
         private void UpdateHead()
         {
-            MatchingPlayerData otherInfo = new MatchingPlayerData();
-            RoleInfoManager.Instance.UpdateHead(_ui.m_playerHead.m_head, otherInfo.HeadId, otherInfo.HeadBorderId);
-            _ui.m_playerHead.m_nameText.text = otherInfo.OtherPlayerName.ToString();
-            _ui.m_playerHead.m_countText.text = otherInfo.OtherPlayerPopularity.ToString();
+            RoleInfoManager.Instance.UpdateHead(_ui.m_playerHead.m_head, MatchingOneDataManager.Instance.OneRoleInfo.JudgingInfo.HeadItemId, MatchingOneDataManager.Instance.OneRoleInfo.JudgingInfo.HeadBorderItemId);
+            _ui.m_playerHead.m_nameText.text = MatchingOneDataManager.Instance.OneRoleInfo.JudgingInfo.RoleName.ToString();
+            _ui.m_playerHead.m_countText.text = MatchingOneDataManager.Instance.OneRoleInfo.JudgingInfo.Score.ToString();
         }
         private void UpdateTime(object param = null)
         {
-
+            long endTime = MatchingCompetitionDataManager.Instance.MatchingEndTimes;
+            long curTime = TimeHelper.ServerNow();
+            if (endTime < curTime + 1)
+            {
+                Timers.inst.Remove(UpdateTime);
+                return;
+            }
+            TimeUtil.FormattingTime(curTime, endTime, out int num, out string str);
+            _ui.m_timeText.text = "评选剩余时间:" + TimeUtil.FormattingTimeTo_DDHHmm(endTime - curTime);
         }
         private void UpdateCountTime(object param = null)
         {

+ 18 - 1
GameClient/Assets/Game/HotUpdate/Views/MatchingCompetition/MatchingCompetitionWorkListView.cs

@@ -56,7 +56,7 @@ namespace GFGGame
         }
         private void UpdateView()
         {
-            _ui.m_workList.numItems = 2;
+            _ui.m_workList.numItems = MatchingCompetitionDataManager.Instance._BeforeRankList.Count;
         }
         private void RenderRankList(int index, GObject obj)
         {
@@ -69,8 +69,25 @@ namespace GFGGame
             {
                 item.m_c1.selectedIndex = 0;
             }
+            MatchingPhotoWorksData otherdata = MatchingCompetitionDataManager.Instance._BeforeRankList[index];
+            JudgingRoundRoleInfo otherInfo = otherdata.JudgingInfo;
+            otherInfo.Rank = index;
+            RoleInfoManager.Instance.UpdateHead(item.m_head, otherInfo.HeadItemId, otherInfo.HeadBorderItemId);
+            item.m_nameText.text = otherInfo.RoleName.ToString();
+            item.m_countText.text = otherInfo.Score.ToString();
+            if (item.target.data == null)
+            {
+                item.target.onClick.Add(OnClickBtnItem);
+            }
+            item.target.data = index;
             UI_Component6.ProxyEnd();
         }
+        private void OnClickBtnItem(EventContext context)
+        {
+            GObject item = context.sender as GObject;
+            int index = (int)item.data;
+            MatchingPhotoWorksData otherInfo = MatchingCompetitionDataManager.Instance._BeforeRankList[index];
+        }
         private void OnClickBtnBack()
         {
             ViewManager.GoBackFrom(typeof(MatchingCompetitionWorksListView).FullName);

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/MatchingCompetition/MatchingCompetitionWorksView.cs

@@ -55,7 +55,7 @@ namespace GFGGame
         }
         private void UpdateView()
         {
-            _ui.m_worksList.numItems = 4;
+            _ui.m_worksList.numItems = MatchingCompetitionDataManager.Instance._BeforeWorksList.Count;
         }
         private void RenderRankList(int index, GObject obj)
         {

BIN
GameClient/Assets/ResIn/UI/MatchingCompetition/MatchingCompetition_fui.bytes