少年修仙传客户端代码仓库
client_linchunjie
2018-11-05 d472b91a3e84f1fe04b6f5373d66c343744a970d
4398 【1.2】聊天气泡框
4个文件已修改
23 ■■■■ 已修改文件
Core/GameEngine/Model/Config/ChatBubbleBoxConfig.cs 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/ChatBubbleBoxConfig.cs.meta 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Chat/ChatBubbleBehaviour.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Chat/ChatBubbleModel.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/ChatBubbleBoxConfig.cs
@@ -21,7 +21,8 @@
        public int[] rightOffset;
        public string Icon { get ; private set; } 
        public int Jump { get ; private set ; }
        public string GainTip { get ; private set; }
        public string GainTip { get ; private set; }
        public int[] color;
        public override string getKey()
        {
@@ -61,7 +62,14 @@
            
                Jump=IsNumeric(rawContents[9]) ? int.Parse(rawContents[9]):0; 
            
                GainTip = rawContents[10].Trim();
                GainTip = rawContents[10].Trim();
                string[] colorStringArray = rawContents[11].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
                color = new int[colorStringArray.Length];
                for (int i=0;i<colorStringArray.Length;i++)
                {
                     int.TryParse(colorStringArray[i],out color[i]);
                }
            }
            catch (Exception ex)
            {
Core/GameEngine/Model/Config/ChatBubbleBoxConfig.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: d3368c32387593943aae6e197d7cb78f
timeCreated: 1541410050
timeCreated: 1541411608
licenseType: Pro
MonoImporter:
  serializedVersion: 2
System/Chat/ChatBubbleBehaviour.cs
@@ -95,6 +95,7 @@
                var iconKey = bubble.GetBubbleIcon(left, ref requireFlip);
                m_BubbleIcon.SetSprite(iconKey);
                m_Flip.flipHorizontal = requireFlip;
                m_Target.color = bubble.color;
                Refresh();
            }
        }
System/Chat/ChatBubbleModel.cs
@@ -52,6 +52,13 @@
                    top = config.rightOffset.Length > 2 ? config.rightOffset[2] : 0,
                    bottom = config.rightOffset.Length > 3 ? config.rightOffset[3] : 0,
                };
                bubble.color = new Color32()
                {
                    r = (byte)(config.color.Length > 0 ? config.color[0] : 0),
                    g = (byte)(config.color.Length > 1 ? config.color[1] : 0),
                    b = (byte)(config.color.Length > 2 ? config.color[2] : 0),
                    a = (byte)(config.color.Length > 3 ? config.color[3] : 255),
                };
                chatBubbles.Add(config.ID, bubble);
            }
        }
@@ -125,6 +132,7 @@
            public int id;
            public RectOffset leftPadding;
            public RectOffset rifhtPadding;
            public Color32 color;
            public string GetBubbleIcon(bool left, ref bool isFlip)
            {