Kaynağa Gözat

Merge branch 'master' of http://10.108.64.190:3000/gfg/client

# Conflicts:
#	GameClient/Assets/Game/HotUpdate/Views/MainUI/MainUIView.cs
leiyasi 1 yıl önce
ebeveyn
işleme
9fb40fd94c

+ 12 - 0
GameClient/Assets/Game/HotUpdate/Assets/AssetReleaser.cs

@@ -58,9 +58,21 @@ namespace GFGGame
 
         public void Restore()
         {
+            SetGoLayers(this.gameObject, 0);
             this.spawnHandle?.Restore();
             this.spawnHandle = null;
         }
 
+        private static void SetGoLayers(GameObject gameObject, int layer)
+        {
+            if (gameObject == null || gameObject.layer == layer)
+                return;
+
+            var helperTransformList = gameObject.GetComponentsInChildren<Transform>(true);
+            int cnt = helperTransformList.Length;
+            for (int i = 0; i < cnt; i++)
+                helperTransformList[i].gameObject.layer = layer;
+        }
+
     }
 }

+ 3 - 0
GameClient/Assets/Game/HotUpdate/Constant/ConstMessage.cs

@@ -183,5 +183,8 @@ namespace GFGGame
 
         //通知阿福赠礼活动状态的更新
         public const string AFU_GIFT_CHANGED = "AFU_GIFT_CHANGED";
+
+        //通知七日签到数据更新
+        public const string SEVENDAY_LOGIN = "SEVENDAYLOGIN";
     }
 }

+ 63 - 13
GameClient/Assets/Game/HotUpdate/DressUp/DressUpLayerOperation.cs

@@ -7,7 +7,7 @@ namespace GFGGame
 {
     public class DressUpLayerOperation : DressUpOperationBase
     {
-        private enum EAction
+        internal enum EAction
         {
             Layer,
             Body,
@@ -15,8 +15,8 @@ namespace GFGGame
         }
         public const int PRE_RENDER_FRAME = 1;
 
-        private ItemCfg itemCfg;
-        private GameObject parentObj;
+        internal ItemCfg itemCfg;
+        internal GameObject parentObj;
         private int layerId;
         private bool needSetMask;
         private bool showAni;
@@ -25,7 +25,7 @@ namespace GFGGame
 
         private int preRendering;
         private ResourceDownloaderOperation downloaderOperation;
-        private EAction actionType;
+        internal EAction actionType;
 
         private string[] locationsLoading;
 
@@ -41,7 +41,7 @@ namespace GFGGame
 
         public void InitLayer(ItemCfg itemCfg, int layerId)
         {
-            //Debug.Log($"InitLayer {itemCfg.id}");
+            Debug.Log($"add InitLayer {itemCfg.id} layerId {layerId}");
             this.itemCfg = itemCfg;
             this.layerId = layerId;
             actionType = EAction.Layer;
@@ -49,24 +49,25 @@ namespace GFGGame
 
         public void InitBody()
         {
-            //Debug.Log("InitBody");
+            Debug.Log("update InitBody");
             actionType = EAction.Body;
         }
 
         public void InitHead()
         {
+            Debug.Log("update InitHead");
             actionType = EAction.Head;
         }
         internal override bool CheckRepeated(DressUpOperationBase t)
         {
-            var operation = t as DressUpLayerOperation;
-            if (operation != null && operation.actionType == this.actionType)
+            DressUpLayerOperation layerOperation = t as DressUpLayerOperation;
+            if (layerOperation != null && layerOperation.actionType == this.actionType)
             {
                 if(actionType == EAction.Layer)
                 {
-                    return (operation.parentObj == this.parentObj
-                        && operation.itemCfg == this.itemCfg
-                        && operation.layerId == this.layerId);
+                    return (layerOperation.parentObj == this.parentObj
+                        && layerOperation.itemCfg == this.itemCfg
+                        && layerOperation.layerId == this.layerId);
 
                 }
                 else
@@ -74,6 +75,20 @@ namespace GFGGame
                     return true;
                 }
             }
+            if(this.actionType == EAction.Layer)
+            {
+                DressUpRemoveOperation removeOperation = t as DressUpRemoveOperation;
+                if(removeOperation != null)
+                {
+                    if(removeOperation.itemID == this.itemCfg.id)
+                    {
+                        if(removeOperation.parentObj == this.parentObj)
+                        {
+                            return true;
+                        }
+                    }
+                }
+            }
             return false;
         }
         /// <summary>
@@ -227,7 +242,25 @@ namespace GFGGame
 
         private void UpdateLayer()
         {
-            //Debug.Log($"UpdateLayer add {itemCfg.id}");
+            Debug.Log($"add UpdateLayer {itemCfg.id} layerId {layerId}");
+            //string objName;
+            //if (showAni)
+            //{
+            //    objName = string.Format(DressUpUtil.FORMAT_ANIMATION_NAME, itemCfg.subType, layerId);
+            //}
+            //else
+            //{
+            //    objName = string.Format(DressUpUtil.FORMAT_SPRITE_NAME, itemCfg.subType, layerId);
+            //}
+            int sortingOrder = ItemTypeCfgArray.Instance.GetSortingOrder(itemCfg.subType, layerId);
+            //var gameObj = DressUpUtil.GetGameObjExisted(parentObj, objName, resPath);
+            //if (gameObj != null)
+            //{
+            //    LogHelper.LogEditor("GetGameObjExisted!");
+
+            //    DressUpUtil.SetRenderersOrder(gameObj, sortingOrder);
+            //    return;
+            //}
             //清理旧的
             var spritObjName = string.Format(DressUpUtil.FORMAT_SPRITE_NAME, itemCfg.subType, layerId);
             DressUpUtil.TryRemoveSprite(parentObj, spritObjName);
@@ -236,7 +269,6 @@ namespace GFGGame
             string effectObjName = string.Format(DressUpUtil.FORMAT_EFFECT_OBJ_NAME, itemCfg.subType, layerId);
             DressUpUtil.TryRemoveObj(parentObj, effectObjName);
             //添加新的
-            int sortingOrder = ItemTypeCfgArray.Instance.GetSortingOrder(itemCfg.subType, layerId);
             if (this.showAni)
             {
                 DressUpUtil.AddAnimationObj(resPath, aniObjName, parentObj, sortingOrder);
@@ -254,10 +286,27 @@ namespace GFGGame
 
         private void UpdateBody()
         {
+            Debug.Log("update UpdateBody");
             var spritObjName = DressUpUtil.BODY_SPRITE_NAME;
             var aniObjName = DressUpUtil.BODY_ANIMATION_NAME;
             var effectObjName = DressUpUtil.BODY_EFFECT_OBJ_NAME;
+            //string objName;
+            //if (this.showAni)
+            //{
+            //    objName = DressUpUtil.BODY_ANIMATION_NAME;
+            //}
+            //else
+            //{
+            //    objName = DressUpUtil.BODY_SPRITE_NAME;
+            //}
             int sortingOrder = 0;
+            //var gameObj = DressUpUtil.GetGameObjExisted(parentObj, objName, resPath);
+            //if (gameObj != null)
+            //{
+            //    LogHelper.LogEditor("GetGameObjExisted!");
+            //    DressUpUtil.SetRenderersOrder(gameObj, sortingOrder);
+            //    return;
+            //}
             var removeBodyAni = DressUpUtil.TryRemoveObj(parentObj, aniObjName);
             DressUpUtil.TryRemoveObj(parentObj, effectObjName);
             DressUpUtil.TryRemoveSprite(parentObj, spritObjName);
@@ -282,6 +331,7 @@ namespace GFGGame
 
         private void UpdateHead()
         {
+            Debug.Log("update UpdateHead");
             var spritObjName = DressUpUtil.HEAD_SPRITE_NAME; 
             int sortingOrder = 1;
             Transform transform_t = parentObj.transform.Find(spritObjName);

+ 11 - 9
GameClient/Assets/Game/HotUpdate/DressUp/DressUpObjUI.cs

@@ -21,8 +21,8 @@ namespace GFGGame
 
         public void ResetSceneObj(int scale = 100, bool needSetMask = false, bool showSceneType = true, GameObject roleObj = null, bool showBg = true)
         {
-            if(sceneObject == null)
-                sceneObject = PrefabManager.Instance.InstantiateSync(ResPathUtil.GetPrefabPath(this.prefabName));
+            //这里每次都要实例化新的,复用会有bug
+            sceneObject = PrefabManager.Instance.InstantiateSync(ResPathUtil.GetPrefabPath(this.prefabName));
             sceneObject.transform.localScale = new Vector3(scale, scale, scale);
             dressUpObj.setSceneObj(sceneObject, needSetMask, showSceneType, roleObj, showBg);
             Timers.inst.AddUpdate(OnUpdate);
@@ -33,12 +33,7 @@ namespace GFGGame
             holder.SetNativeObject(wrapper);
             wrapper.wrapTarget = sceneObject;
         }
-
-        public void SetScale(Vector2 vector2)
-        {
-            wrapper.scale = vector2;
-        }
-
+        
         public void Dispose()
         {
             if (sceneObject != null)
@@ -55,6 +50,10 @@ namespace GFGGame
 
             if (wrapper != null)
             {
+                if (wrapper.wrapTarget != null)
+                {
+                    wrapper.wrapTarget = null;
+                }
                 wrapper.Dispose();
                 wrapper = null;
             }
@@ -67,7 +66,10 @@ namespace GFGGame
                 Timers.inst.Remove(OnUpdate);
                 return;
             }
-            wrapper.wrapTarget = sceneObject;
+            if(wrapper != null)
+            {
+                wrapper.wrapTarget = sceneObject;
+            }
             //wrapper.CacheRenderers();
         }
     }

+ 18 - 14
GameClient/Assets/Game/HotUpdate/DressUp/DressUpRemoveOperation.cs

@@ -1,25 +1,23 @@
 using UnityEngine;
 using YooAsset;
+using static FairyGUI.ControllerAction;
 
 namespace GFGGame
 {
     public class DressUpRemoveOperation : DressUpOperationBase
     {
-        private int itemID;
-        private GameObject sceneObj;
-        private GameObject parentObj;
+        internal int itemID;
+        internal GameObject parentObj;
 
-        public DressUpRemoveOperation(int itemID, GameObject sceneObj, GameObject parentObj)
+        public DressUpRemoveOperation(int itemID, GameObject parentObj)
         {
             this.itemID = itemID;
-            this.sceneObj = sceneObj;
             this.parentObj = parentObj;
-            Debug.Log($"remove {itemID}");
+            Debug.Log($"remove init {itemID}");
         }
 
         internal override void Release()
         {
-            this.sceneObj = null;
             this.parentObj = null;
         }
 
@@ -41,21 +39,27 @@ namespace GFGGame
 
         internal override bool CheckRepeated(DressUpOperationBase t)
         {
-            var operation = t as DressUpRemoveOperation;
-            return (operation != null 
-                && operation.itemID == this.itemID 
-                && operation.sceneObj == this.sceneObj);
+            DressUpLayerOperation layerOperation = t as DressUpLayerOperation;
+            if (layerOperation != null && layerOperation.actionType == DressUpLayerOperation.EAction.Layer)
+{
+                return (this.itemID == layerOperation.itemCfg.id
+                    && this.parentObj == layerOperation.parentObj);
+            }
+            var removeOperation = t as DressUpRemoveOperation;
+            return (removeOperation != null 
+                && removeOperation.itemID == this.itemID 
+                && removeOperation.parentObj == this.parentObj);
         }
 
         internal override void UpdateView()
         {
-            if(sceneObj == null)
+            if(parentObj == null)
             {
                 this.Release();
                 return;
             }
-            Debug.Log($"UpdateView remove {itemID}");
-            DressUpUtil.RemoveItem(this.itemID, this.sceneObj, this.parentObj);
+            Debug.Log($"remove UpdateView {itemID}");
+            DressUpUtil.RemoveItem(this.itemID, this.parentObj);
         }
     }
 }

+ 53 - 87
GameClient/Assets/Game/HotUpdate/DressUp/DressUpUtil.cs

@@ -92,62 +92,62 @@ namespace GFGGame
             return null;
         }
 
-        public static void RemoveItem(int itemID, GameObject sceneObj, GameObject parentObj = null)
+        public static void RemoveItem(int itemID, GameObject parentObj)
         {
             ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(itemID);
-            if (itemCfg != null)
+            if (itemCfg == null || parentObj== null) return;
+            string spritObjName;
+            string aniObjName;
+            //默认层
+            if (!string.IsNullOrEmpty(itemCfg.resLayer1))
+            {
+                spritObjName = string.Format(FORMAT_SPRITE_NAME, itemCfg.subType, 1);
+                TryRemoveSprite(parentObj, spritObjName);
+                aniObjName = string.Format(FORMAT_ANIMATION_NAME, itemCfg.subType, 1);
+                TryRemoveObj(parentObj, aniObjName);
+                aniObjName = string.Format(FORMAT_EFFECT_OBJ_NAME, itemCfg.subType, 1);
+                TryRemoveObj(parentObj, aniObjName);
+            }
+            //特殊层
+            if (!string.IsNullOrEmpty(itemCfg.resLayer2))
+            {
+                spritObjName = string.Format(FORMAT_SPRITE_NAME, itemCfg.subType, 2);
+                TryRemoveSprite(parentObj, spritObjName);
+                aniObjName = string.Format(FORMAT_ANIMATION_NAME, itemCfg.subType, 2);
+                TryRemoveObj(parentObj, aniObjName);
+                aniObjName = string.Format(FORMAT_EFFECT_OBJ_NAME, itemCfg.subType, 2);
+                TryRemoveObj(parentObj, aniObjName);
+            }
+            //第三层
+            if (!string.IsNullOrEmpty(itemCfg.resLayer3))
+            {
+                spritObjName = string.Format(FORMAT_SPRITE_NAME, itemCfg.subType, 3);
+                TryRemoveSprite(parentObj, spritObjName);
+                aniObjName = string.Format(FORMAT_ANIMATION_NAME, itemCfg.subType, 3);
+                TryRemoveObj(parentObj, aniObjName);
+                aniObjName = string.Format(FORMAT_EFFECT_OBJ_NAME, itemCfg.subType, 3);
+                TryRemoveObj(parentObj, aniObjName);
+            }
+        }
+
+        public static DressUpRemoveOperation RemoveItemAsync(int itemID, GameObject sceneObj, GameObject parentObj = null)
+        {
+            ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(itemID);
+            if (itemCfg == null) return null;
+            if (parentObj == null)
             {
-                if (parentObj == null)
-                {
-                    if (itemCfg.subType == ConstDressUpItemType.BEI_JING || DressUpMenuItemCfg1Array.Instance.CheckIsSceneTypeBySubType(itemCfg.subType))
-                    {
-                        parentObj = sceneObj;
-                    }
-                    else
-                    {
-                        //角色
-                        Transform role = sceneObj.transform.Find(ROLE_OBJ_NAME);
-                        parentObj = role.gameObject;
-                    }
-                }
-                string spritObjName;
-                string aniObjName;
-                //默认层
-                if (!string.IsNullOrEmpty(itemCfg.resLayer1))
-                {
-                    spritObjName = string.Format(FORMAT_SPRITE_NAME, itemCfg.subType, 1);
-                    TryRemoveSprite(parentObj, spritObjName);
-                    aniObjName = string.Format(FORMAT_ANIMATION_NAME, itemCfg.subType, 1);
-                    TryRemoveObj(parentObj, aniObjName);
-                    aniObjName = string.Format(FORMAT_EFFECT_OBJ_NAME, itemCfg.subType, 1);
-                    TryRemoveObj(parentObj, aniObjName);
-                }
-                //特殊层
-                if (!string.IsNullOrEmpty(itemCfg.resLayer2))
+                if (itemCfg.subType == ConstDressUpItemType.BEI_JING || DressUpMenuItemCfg1Array.Instance.CheckIsSceneTypeBySubType(itemCfg.subType))
                 {
-                    spritObjName = string.Format(FORMAT_SPRITE_NAME, itemCfg.subType, 2);
-                    TryRemoveSprite(parentObj, spritObjName);
-                    aniObjName = string.Format(FORMAT_ANIMATION_NAME, itemCfg.subType, 2);
-                    TryRemoveObj(parentObj, aniObjName);
-                    aniObjName = string.Format(FORMAT_EFFECT_OBJ_NAME, itemCfg.subType, 2);
-                    TryRemoveObj(parentObj, aniObjName);
+                    parentObj = sceneObj;
                 }
-                //第三层
-                if (!string.IsNullOrEmpty(itemCfg.resLayer3))
+                else
                 {
-                    spritObjName = string.Format(FORMAT_SPRITE_NAME, itemCfg.subType, 3);
-                    TryRemoveSprite(parentObj, spritObjName);
-                    aniObjName = string.Format(FORMAT_ANIMATION_NAME, itemCfg.subType, 3);
-                    TryRemoveObj(parentObj, aniObjName);
-                    aniObjName = string.Format(FORMAT_EFFECT_OBJ_NAME, itemCfg.subType, 3);
-                    TryRemoveObj(parentObj, aniObjName);
+                    //角色
+                    Transform role = sceneObj.transform.Find(ROLE_OBJ_NAME);
+                    parentObj = role.gameObject;
                 }
             }
-        }
-
-        public static DressUpRemoveOperation RemoveItemAsync(int itemID, GameObject sceneObj, GameObject parentObj = null)
-        {
-            var operation = new DressUpRemoveOperation(itemID, sceneObj, parentObj);
+            var operation = new DressUpRemoveOperation(itemID, parentObj);
             operation.Begin();
             return operation;
         }
@@ -178,7 +178,6 @@ namespace GFGGame
             var extPng = "png";
             string resPath = null;
             string effectResPath = null;
-            string objName;
             bool showAni = !string.IsNullOrEmpty(actionRes);
             string aniResPath = null;
             if (showAni)
@@ -192,7 +191,6 @@ namespace GFGGame
             if(showAni)
             {
                 resPath = aniResPath;
-                objName = BODY_ANIMATION_NAME;
                 //特效
                 effectResPath = ResPathUtil.GetDressUpEffectPath(actionRes, true);
                 if (!YooAssets.CheckResExist(effectResPath))
@@ -203,9 +201,8 @@ namespace GFGGame
             else
             {
                 resPath = ResPathUtil.GetDressUpPath(BODY_DEFAULT_RES_NAME, extPng);
-                objName = BODY_SPRITE_NAME;
             }
-            if (GetGameObjExisted(parentObj, objName, resPath) != null || !YooAssets.CheckResExist(resPath))
+            if (!YooAssets.CheckResExist(resPath))
             {
                 return null;
             }
@@ -230,20 +227,16 @@ namespace GFGGame
                 }
             }
 
-            string objName;
             if (showAni)
             {
                 resPath = aniResPath;
-                objName = string.Format(DressUpUtil.FORMAT_ANIMATION_NAME, itemCfg.subType, layerId);
             }
             else
             {
                 resPath = ResPathUtil.GetDressUpPath(itemCfg, layerId);
-                objName = string.Format(DressUpUtil.FORMAT_SPRITE_NAME, itemCfg.subType, layerId);
             }
 
-            var gameObj = DressUpUtil.GetGameObjExisted(parentObj, objName, resPath);
-            if (gameObj != null || !YooAssets.CheckResExist(resPath))
+            if (!YooAssets.CheckResExist(resPath))
             {
                 return null;
             }
@@ -469,7 +462,7 @@ namespace GFGGame
             }
         }
 
-        private static void SetRenderersOrder(GameObject gameObj, int sortingOrder, bool isAdd = false)
+        public static void SetRenderersOrder(GameObject gameObj, int sortingOrder)
         {
             var meshRenderers = gameObj.transform.GetComponentsInChildren<MeshRenderer>();
             for (int i = 0; i < meshRenderers.Length; i++)
@@ -477,14 +470,7 @@ namespace GFGGame
                 var renderer = meshRenderers[i].GetComponent<Renderer>();
                 if (renderer != null)
                 {
-                    if (isAdd)
-                    {
-                        renderer.sortingOrder = renderer.sortingOrder + sortingOrder;
-                    }
-                    else
-                    {
-                        renderer.sortingOrder = sortingOrder;
-                    }
+                    renderer.sortingOrder = sortingOrder;
                 }
             }
             ParticleSystem[] particles = gameObj.transform.GetComponentsInChildren<ParticleSystem>();
@@ -493,33 +479,13 @@ namespace GFGGame
                 var renderer = particles[i].GetComponent<Renderer>();
                 if (renderer != null)
                 {
-                    if (isAdd)
-                    {
-                        renderer.sortingOrder = renderer.sortingOrder + sortingOrder;
-                    }
-                    else
-                    {
-
-                        renderer.sortingOrder = sortingOrder;
-                    }
+                    renderer.sortingOrder = sortingOrder;
                 }
             }
 
-            SetGoLayers(gameObj, 0);
         }
 
 
-        private static void SetGoLayers(GameObject gameObject, int layer)
-        {
-            if (gameObject == null || gameObject.layer == layer)
-                return;
-
-            var helperTransformList = gameObject.GetComponentsInChildren<Transform>(true);
-            int cnt = helperTransformList.Length;
-            for (int i = 0; i < cnt; i++)
-                helperTransformList[i].gameObject.layer = layer;
-        }
-
     }
 
 }

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Effect/EffectUI.cs

@@ -51,6 +51,7 @@ namespace GFGGame
                     _wrapper.wrapTarget = null;
                 }
                 _wrapper.Dispose();
+                _wrapper = null;
             }
         }
 

+ 2 - 0
GameClient/Assets/Game/HotUpdate/ServerProxy/ActivitySProxy.cs

@@ -37,6 +37,8 @@ namespace GFGGame
                 {
                     ActivityDataManager.Instance.sevenDayLoginLoginIdList = response.KsBonusId;
                     ActivityDataManager.Instance.sevenDayLoginBonusStatusList = response.VsBonusStatus;
+
+                    EventAgent.DispatchEvent(ConstMessage.SEVENDAY_LOGIN);
                     return true;
                 }
             }

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/League/LeagueTeaPartyView.cs

@@ -33,7 +33,7 @@ namespace GFGGame
             isfullScreen = true;
             isReturnView = true;
 
-            _ui.m_loaBg.url = ResPathUtil.GetDressUpPath("chahuibg");
+            _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("chahuibg");
             _ui.m_btnBack.onClick.Add(OnBtnBackClick);
             _ui.m_btnChat.onClick.Add(OnBtnChatClick);
             _ui.m_btnChallenge.onClick.Add(OnBtnChallengeClick);

+ 69 - 1
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightSingleScoreView.cs

@@ -479,7 +479,8 @@ namespace GFGGame
             {
                 allCircleScore = ScoreSystemData.Instance.GetAllCircleAddScore(roleData);
             }
-            _ui.m_comClick.m_comAllPerfect.m_txtCount.text = allCircleScore.ToString();
+            //_ui.m_comClick.m_comAllPerfect.m_txtCount.text = allCircleScore.ToString();
+            CheckNumImage(allCircleScore.ToString());
             _ui.m_comClick.m_comResult.target.visible = false;
 
             _time = 0;
@@ -497,6 +498,73 @@ namespace GFGGame
             }
         }
 
+        private void CheckNumImage(string Num)
+        {
+            string res = "ui://Main/zd_pf_sz";
+            List<GLoader> num = new List<GLoader>
+            {
+                _ui.m_comClick.m_comAllPerfect.m_num0,
+                _ui.m_comClick.m_comAllPerfect.m_num1,
+                _ui.m_comClick.m_comAllPerfect.m_num2,
+                _ui.m_comClick.m_comAllPerfect.m_num3,
+                _ui.m_comClick.m_comAllPerfect.m_num4,
+            };
+            string numflog = "";
+            for (int i = 0; i < 5; i++)
+            {
+                numflog = Num.Length > i ? Num.Substring(i, 1) : "";
+                switch (Num.Length)
+                {
+                    case 0:
+                        num[i].url = null;
+                        break;
+                    case 1:
+                        if (i == 2)
+                        {
+                            num[i].url = res + numflog;
+                        }
+                        else
+                        {
+                            num[i].url = null;
+                        }
+                        break;
+                    case 2:
+                        if (i >= 1 && i <= 2)
+                        {
+                            num[i].url = res + numflog;
+                        }
+                        else
+                        {
+                            num[i].url = null;
+                        }
+                        break;
+                    case 3:
+                        if (i >= 1 && i <= 3)
+                        {
+                            num[i].url = res + numflog;
+                        }
+                        else
+                        {
+                            num[i].url = null;
+                        }
+                        break;
+                    case 4:
+                        if (i >= 0 && i <= 3)
+                        {
+                            num[i].url = res + numflog;
+                        }
+                        else
+                        {
+                            num[i].url = null;
+                        }
+                        break;
+                    case 5:
+                        num[i].url = res + numflog;
+                        break;
+                }
+            }
+        }
+
         private void GetCurStar(out int star)
         {
             StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(InstanceZonesDataManager.currentLevelCfgId);

+ 0 - 3
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightTargetScoreView.cs

@@ -658,13 +658,10 @@ namespace GFGGame
                 _ui.m_comClick.m_comAllPerfect.m_num3,
                 _ui.m_comClick.m_comAllPerfect.m_num4,
             };
-            ET.Log.Debug("y:  " +_ui.m_comClick.m_comAllPerfect.m_numGrade.y);
             string numflog = "";
             for (int i = 0 ; i < 5; i++)
             { 
-                ET.Log.Debug("numflog" + numflog +"     i"+ i);
                 numflog = Num.Length > i ? Num.Substring(i, 1) : "";
-                ET.Log.Debug("numflog" + numflog);
                 switch (Num.Length)
                 {
                     case 0:

+ 34 - 11
GameClient/Assets/Game/HotUpdate/Views/MainUI/MainUIView.cs

@@ -158,9 +158,9 @@ namespace GFGGame
             EventAgent.AddEventListener(ConstMessage.CHANGE_ROLE_HEAD, UpdateHead);
             EventAgent.AddEventListener(ConstMessage.RESET_DAILY_DATA, ResetDailyData);
             EventAgent.AddEventListener(ConstMessage.AFU_GIFT_CHANGED, ChangeAfuActivityState);
+            EventAgent.AddEventListener(ConstMessage.SEVENDAY_LOGIN, SevenDayLoginShow);
         }
 
-
         protected override void RemoveEventListener()
         {
             base.RemoveEventListener();
@@ -169,6 +169,7 @@ namespace GFGGame
             EventAgent.RemoveEventListener(ConstMessage.RED_CHANGE, UpdateRedDot);
             EventAgent.RemoveEventListener(ConstMessage.CHANGE_ROLE_HEAD, UpdateHead);
             EventAgent.RemoveEventListener(ConstMessage.AFU_GIFT_CHANGED, ChangeAfuActivityState);
+            EventAgent.RemoveEventListener(ConstMessage.SEVENDAY_LOGIN, SevenDayLoginShow);
         }
 
         protected override void OnShown()
@@ -194,7 +195,7 @@ namespace GFGGame
             CheckProbabilityUp();
             _valueBarController.OnShown();
 
-            Log.Debug("zyq"+ GameGlobal.isLogon);
+            Log.Debug("zyq" + GameGlobal.isLogon);
             if (GameGlobal.isLogon)
             {
                 ET.Log.Debug("zyq" + GameGlobal.isLogon);
@@ -203,13 +204,16 @@ namespace GFGGame
                     GuideDataManager.currentGuideId <= 0)
                 {
                     ViewManager.Show<SevenDayLoginView>();
-                    
+
                 }
                 else if (RedDotDataManager.Instance.DailySignRed())
                 {
                     ViewManager.Show<DailySignView>(new object[] { 1 });
                 }
             }
+            //long lastTime = GameGlobal.lastLoginTime; // GameGlobal.myNumericComponent.GetAsInt(NumericType.OnlineTimeSecs);
+
+
 
             SetPos();
             GetAdIds();
@@ -509,7 +513,7 @@ namespace GFGGame
         {
             LogServerHelper.SendPlayParticipationLog((int)PlayParticipationEnum.TIAN_YE_DIAO_CHA, 1);
 
-            ViewManager.Show<FieldView>(null, new object[] {typeof(MainUIView).FullName, this.viewData });
+            ViewManager.Show<FieldView>(null, new object[] { typeof(MainUIView).FullName, this.viewData });
         }
 
         private void OnClickBtnPoem()
@@ -780,7 +784,7 @@ namespace GFGGame
                 }
             }
 
-             List<int> actListChargeIds = ActivityGlobalDataManager.Instance.GetActivityInfoIdsByType(ConstLimitTimeActivityType.ActLimitChargeId);
+            List<int> actListChargeIds = ActivityGlobalDataManager.Instance.GetActivityInfoIdsByType(ConstLimitTimeActivityType.ActLimitChargeId);
             int actLimitChargeId = actListChargeIds.Count > 0 ? actListChargeIds[0] : 0;
             if (ActivityDataManager.Instance.lastActLimitChargeId != actLimitChargeId)
             {
@@ -825,7 +829,7 @@ namespace GFGGame
             if (_ui.m_btnActivityAfuGift.target.visible)
             {
                 var activityInfo = ActivityGlobalDataManager.Instance.GetActivityInfoOneByType(ActivityType.AFZL);
-                if(activityInfo == null)
+                if (activityInfo == null)
                 {
                     _ui.m_btnActivityAfuGift.target.visible = false;
                 }
@@ -955,7 +959,7 @@ namespace GFGGame
                 jumpIndex = adCfg.jumpParamArr[0];
             }
 
-            if(jumpIndex != 0)
+            if (jumpIndex != 0)
                 ViewManager.Show($"GFGGame.{adCfg.jumpId}", jumpIndex);
             else
                 ViewManager.Show($"GFGGame.{adCfg.jumpId}", param);
@@ -1020,13 +1024,13 @@ namespace GFGGame
             RedDotController.Instance.SetComRedDot(_ui.m_btnTravel.target, RedDotDataManager.Instance.GetTravelRed(), "", -36, 32);
             RedDotController.Instance.SetComRedDot(_btnLeague, RedDotDataManager.Instance.GetLeagueRed(), "", -8);
             RedDotController.Instance.SetComRedDot(_ui.m_btnDailyWelfare.target, RedDotDataManager.Instance.GetDailyWelfareRed(), "", 9, -1);
-            RedDotController.Instance.SetComRedDot(_ui.m_btnActivityLuckyBox.target, RedDotDataManager.Instance.GetMeiRiTeHuiRed() 
-                || RedDotDataManager.Instance.GetActLuckyBoxRewardRed(ConstLimitTimeActivityType.ActLimitLuckyBox) 
+            RedDotController.Instance.SetComRedDot(_ui.m_btnActivityLuckyBox.target, RedDotDataManager.Instance.GetMeiRiTeHuiRed()
+                || RedDotDataManager.Instance.GetActLuckyBoxRewardRed(ConstLimitTimeActivityType.ActLimitLuckyBox)
                 || RedDotDataManager.Instance.GetActLuckyBoxTaskdRed() || RedDotDataManager.Instance.GetGiftBagRewardRed(), "", -11, 5);
             RedDotController.Instance.SetComRedDot(_btnBag, RedDotDataManager.Instance.GetMainBagGiftRed(), "", -8);
             RedDotController.Instance.SetComRedDot(_ui.m_btnActivityDay7.target, RedDotDataManager.Instance.GetActivityDay7Red());
             RedDotController.Instance.SetComRedDot(_ui.m_btnWanShiLi.target, RedDotDataManager.Instance.GetActivityWanShiLiRed(), "", -25, -7);
-            
+
             RedDotController.Instance.SetComRedDot(_ui.m_btnXiuFang.target, RedDotDataManager.Instance.GetClothingFosterRed() || RedDotDataManager.Instance.GetClothingSyntheticRed(), "", -10, 20);
             RedDotController.Instance.SetComRedDot(_ui.m_btnCiPai.target, RedDotDataManager.Instance.GetCardRed(), "", -10, 20);
             RedDotController.Instance.SetComRedDot(_ui.m_btnZhaiXing.target, RedDotDataManager.Instance.GetActLuckyBoxRewardRed(ConstLimitTimeActivityType.ActLimitTsy) || RedDotDataManager.Instance.GetLuckyBoxFreeTimes());
@@ -1036,7 +1040,7 @@ namespace GFGGame
             {
                 RedDotController.Instance.SetComRedDot(_ui.m_btnActivityAfuGift.target, ActivityAfuGiftDataManager.Instance.HaveCanGetReward(), "", -43, 2);
             }
-            
+
         }
 
         private void CheckProbabilityUp()
@@ -1164,5 +1168,24 @@ namespace GFGGame
             UpdateHead();
             UpdateBtnFirstRecharge();
         }
+        private void SevenDayLoginShow()
+        {
+            //if (!TimeUtil.CheckIsSameTime(lastTime * 1000, TimeHelper.ClientNow()))
+            if (GameGlobal.isLogon)
+            {
+                if (ActivityDataManager.Instance.CanGetSevenDayBonus() &&
+                    GuideDataManager.currentGuideId <= 0)
+                {
+                    ViewManager.Show<SevenDayLoginView>();
+
+                }
+                else if (RedDotDataManager.Instance.DailySignRed())
+                {
+                    ViewManager.Show<DailySignView>(new object[] { 1 });
+                }
+
+                //GameGlobal.lastLoginTime = GameGlobal.myNumericComponent.GetAsInt(NumericType.OnlineTimeSecs);
+            }
+        }
     }
 }

BIN
GameClient/Assets/ResIn/UI/Main/Main_fui.bytes