فهرست منبع

添加默认的不显示

leiyasi 1 سال پیش
والد
کامیت
41a4ba2dea

+ 13 - 2
GameClient/Assets/Game/HotUpdate/Data/DressUpMenuItemDataManager.cs

@@ -720,7 +720,7 @@ namespace GFGGame
 
             for (int i = 0; i < itemCfgs.Count; i++)
             {
-                if(itemCfgs[i].isHide <= 0 && itemCfgs[i].mainScore > 0)
+                if(CanShow(itemCfgs[i]))
                 {
                     result.Add(itemCfgs[i].id);
                 }
@@ -729,6 +729,17 @@ namespace GFGGame
             return result;
         }
 
+        private static bool CanShow(ItemCfg item)
+        {
+            // 默认的不显示
+            List<int> defaultID = new List<int>{ 10000, 20000, 30000, 50000, 60000 };
+            if (defaultID.Contains(item.id))
+            {
+                return false;
+            }
+            return (item.isHide <= 0 && item.mainScore > 0);
+        }
+
         public static List<int> GetAllDressUpGuideIdListBySubTypes(List<int> subTypes)
         {
             List<int> result = new List<int>();
@@ -780,7 +791,7 @@ namespace GFGGame
 
             for (int i = 0; i < itemCfgs.Count; i++)
             {
-                if (itemCfgs[i].isHide <= 0)
+                if (CanShow(itemCfgs[i]))
                 {
                     result.Add(itemCfgs[i].id);
                 }

+ 2 - 2
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryDialogView.cs

@@ -642,7 +642,7 @@ namespace GFGGame
 
         private void StartTyping()
         {
-            _typingEffect.SetSpeed(GameConst.LETTERS_INTERVAL_MAX / _speedAutoPlay);
+            _typingEffect.SetSpeed(_speedAutoPlay);
             _typingEffect.Start();
         }
 
@@ -782,7 +782,7 @@ namespace GFGGame
                 _ui.m_btnSpeedUp.text = "";
             }
 
-            _typingEffect?.SetSpeed(GameConst.LETTERS_INTERVAL_MAX / _speedAutoPlay);
+            _typingEffect?.SetSpeed(_speedAutoPlay);
         }
 
         private void StopAutoPlay()

+ 7 - 8
GameClient/Assets/Game/HotUpdate/Views/MainStory/TypingFadeEffectPro.cs

@@ -14,13 +14,12 @@ namespace GFGGame
     {
         protected Color32[] _backupColor32s;
         protected Color32[] _color32s;
-        protected float charFadeDuration = 0.3f;
-
-
-        private float _currentCharFadeTime;
 
         public Action typeFinishedAction;
-        public float progressShowNextWord = 0.06f;
+        // 出现下一个字符的间隔
+        public float showNextWordInternal = 0.06f;
+        // 字符渐变时间
+        protected float charFadeDuration = 0.08f;
 
         /// <summary>
         /// 
@@ -50,7 +49,6 @@ namespace GFGGame
             _mainLayerVertCount = 0;
             _printIndex = 0;
             _vertIndex = 0;
-            _currentCharFadeTime = 0.0f;
             _started = true;
 
             int vertCount = _textField.graphics.mesh.vertexCount;
@@ -215,7 +213,7 @@ namespace GFGGame
                 if (!_started)
                     break;
 
-                if(timer>= progressShowNextWord)
+                if(timer>= showNextWordInternal)
                 {
                     timer = 0;
                     if (_printIndex >= listCnt - 1)
@@ -270,7 +268,8 @@ namespace GFGGame
 
         public void SetSpeed(float speed)
         {
-            charFadeDuration = speed;
+            charFadeDuration /= speed;
+            showNextWordInternal /= speed;
         }
 
     }