Example #1
0
 public EmojiVO(GDSKit.chat_expression gdsInfo)
 {
     this.gdsInfo = gdsInfo;
     emojiInfo    = new BMSymbol()
     {
         sequence   = "[#" + gdsInfo.expression_name + "]",
         spriteName = gdsInfo.expression_icon
     };
 }
Example #2
0
        public static void AddInstance(chat_expression obj)
        {
            string _key_ = obj.GetKeyInDict();

            if (_dict_.ContainsKey(_key_))
            {
                UnityEngine.Debug.LogWarning("在名为chat_expression的GDS文件中已经存在: " + _key_);
                return;
            }
            _dict_.Add(_key_, obj);
        }
Example #3
0
        private static chat_expression CreateInstance(string[] objArr)
        {
            chat_expression _ret_ = new chat_expression();

            _ret_.expression_name = String.Intern(CSVParser.GetAsString(objArr[0]));

            _ret_.expression_type = CSVParser.GetAsInt(objArr[1]);

            _ret_.expression_icon = String.Intern(CSVParser.GetAsString(objArr[2]));



            return(_ret_);
        }
Example #4
0
        public static void Initialize(List <string[]> data)
        {
            if (_isInited_)
            {
                return;
            }

            foreach (var objArr in data)
            {
                chat_expression _value_ = CreateInstance(objArr);
                PostProcessor(_value_);
                string _key_ = _value_.GetKeyInDict();

                _dict_.Add(_key_, _value_);
            }

            _isInited_ = true;
        }
Example #5
0
        public static chat_expression GetInstance(string expression_name)
        {
            if (!_isInited_)
            {
                return(null);
            }
            string _key_ = expression_name.ToString();

            if (null != _externalDataSource_)
            {
                return(_externalDataSource_.Invoke(typeof(chat_expression), _key_) as chat_expression);
            }
            else
            {
                chat_expression _ret_ = null;
                if (!_dict_.TryGetValue(_key_, out _ret_))
                {
                    throw new Exception("在名为chat_expression的GDS文件中没有发现key : " + _key_);
                }
                return(_ret_);
            }
        }
Example #6
0
 static partial void PostProcessor(chat_expression instance);