Ejemplo n.º 1
0
        public static DeclareGrowthFundAll Create(string in_award, int in_number, int in_numberUp, int in_renovateBegin)
        {
            DeclareGrowthFundAll tmp = new DeclareGrowthFundAll();

            tmp._award         = in_award;
            tmp._number        = in_number;
            tmp._numberUp      = in_numberUp;
            tmp._renovateBegin = in_renovateBegin;

            return(tmp);
        }
Ejemplo n.º 2
0
 public static void Convert(Dictionary <int, DeclareGrowthFundAll> data)
 {
     if (data == null)
     {
         return;
     }
     data.Clear();
     data.Add(50, DeclareGrowthFundAll.Create(StringDefines.Key_13613, 50, 0, 0));
     data.Add(100, DeclareGrowthFundAll.Create(StringDefines.Key_13614, 100, 100, 24));
     data.Add(200, DeclareGrowthFundAll.Create(StringDefines.Key_13615, 200, 0, 0));
     data.Add(300, DeclareGrowthFundAll.Create(StringDefines.Key_13616, 300, 300, 96));
     data.Add(400, DeclareGrowthFundAll.Create(StringDefines.Key_13617, 400, 0, 0));
     data.Add(500, DeclareGrowthFundAll.Create(StringDefines.Key_13618, 500, 0, 0));
 }
Ejemplo n.º 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[]> >("DataGrowthFundAll");
                if (dic == null)
                {
                    LuaEnv.SharedLuaEnv.DoString("DataGrowthFundAll = require 'Lua/Config/DataGrowthFundAll'");
                    dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataGrowthFundAll");
                }

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclareGrowthFundAll>(6);
                    foreach (var item in dic)
                    {
                        DeclareGrowthFundAll tmp = new DeclareGrowthFundAll();
                        tmp.Award         = CfgStringLua.Get(item.Value[0]);
                        tmp.Number        = item.Value[1];
                        tmp.NumberUp      = item.Value[2];
                        tmp.RenovateBegin = item.Value[3];

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