示例#1
0
        public static DeclareComboKill Create(int in_comboKillScore, int in_count, int in_shutDownScore, string in_title)
        {
            DeclareComboKill tmp = new DeclareComboKill();

            tmp._comboKillScore = in_comboKillScore;
            tmp._count          = in_count;
            tmp._shutDownScore  = in_shutDownScore;
            tmp._title          = in_title;

            return(tmp);
        }
示例#2
0
 public static void Convert(Dictionary <int, DeclareComboKill> data)
 {
     if (data == null)
     {
         return;
     }
     data.Clear();
     data.Add(1, DeclareComboKill.Create(0, 1, 0, StringDefines.Key_13622));
     data.Add(3, DeclareComboKill.Create(0, 3, 0, StringDefines.Key_13623));
     data.Add(5, DeclareComboKill.Create(1, 5, 3, StringDefines.Key_13624));
     data.Add(10, DeclareComboKill.Create(2, 10, 5, StringDefines.Key_13625));
     data.Add(15, DeclareComboKill.Create(3, 15, 10, StringDefines.Key_13626));
     data.Add(20, DeclareComboKill.Create(5, 20, 15, StringDefines.Key_13627));
     data.Add(30, DeclareComboKill.Create(10, 30, 20, StringDefines.Key_13628));
 }
示例#3
0
        public static void SetData()
        {
            if (_dataCaches == null && LuaEnv.isLoadLuaCfg)
            {
                long startTime = DateTime.Now.Ticks;
                Dictionary <int, int[]> dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataComboKill");
                if (dic == null)
                {
                    LuaEnv.SharedLuaEnv.DoString("DataComboKill = require 'Lua/Config/DataComboKill'");
                    dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataComboKill");
                }

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclareComboKill>(7);
                    foreach (var item in dic)
                    {
                        DeclareComboKill tmp = new DeclareComboKill();
                        tmp.ComboKillScore = item.Value[0];
                        tmp.Count          = item.Value[1];
                        tmp.ShutDownScore  = item.Value[2];
                        tmp.Title          = CfgStringLua.Get(item.Value[3]);

                        _dataCaches.Add(item.Key, tmp);
                    }
                }
                Record(startTime, DateTime.Now.Ticks, "ComboKill");
            }
            if (_dataCaches == null && _fillDataCallBack != null)
            {
                if (_dataCaches == null)
                {
                    long startTime = DateTime.Now.Ticks;
                    _dataCaches = new Dictionary <int, DeclareComboKill>(7);
                    _fillDataCallBack(_dataCaches);
                    Record(startTime, DateTime.Now.Ticks, "ComboKill");
                }
            }
        }