예제 #1
0
        public static DeclareModelConfig Create(int in_applyStatus, int in_id, int in_isShow, string in_main_textrue, string in_mask_textrue, int in_model, string in_out_line_param, int in_shader, string in_sharder_param1, string in_sharder_param2, string in_sharder_param3, string in_sharder_param4, string in_sharder_param5, int in_type, string in_vfx_1, string in_vfx_2, string in_vfx_3, string in_vfx_4, string in_vfx_5, int in_vfx_type)
        {
            DeclareModelConfig tmp = new DeclareModelConfig();

            tmp._applyStatus    = in_applyStatus;
            tmp._id             = in_id;
            tmp._isShow         = in_isShow;
            tmp._main_textrue   = in_main_textrue;
            tmp._mask_textrue   = in_mask_textrue;
            tmp._model          = in_model;
            tmp._out_line_param = in_out_line_param;
            tmp._shader         = in_shader;
            tmp._sharder_param1 = in_sharder_param1;
            tmp._sharder_param2 = in_sharder_param2;
            tmp._sharder_param3 = in_sharder_param3;
            tmp._sharder_param4 = in_sharder_param4;
            tmp._sharder_param5 = in_sharder_param5;
            tmp._type           = in_type;
            tmp._vfx_1          = in_vfx_1;
            tmp._vfx_2          = in_vfx_2;
            tmp._vfx_3          = in_vfx_3;
            tmp._vfx_4          = in_vfx_4;
            tmp._vfx_5          = in_vfx_5;
            tmp._vfx_type       = in_vfx_type;

            return(tmp);
        }
예제 #2
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[]> >("DataModelConfig");
                if (dic == null)
                {
                    LuaEnv.SharedLuaEnv.DoString("DataModelConfig = require 'Lua/Config/DataModelConfig'");
                    dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataModelConfig");
                }

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclareModelConfig>(15057);
                    foreach (var item in dic)
                    {
                        DeclareModelConfig tmp = new DeclareModelConfig();
                        tmp.ApplyStatus   = item.Value[0];
                        tmp.Id            = item.Value[1];
                        tmp.IsShow        = item.Value[2];
                        tmp.MainTextrue   = CfgStringLua.Get(item.Value[3]);
                        tmp.MaskTextrue   = CfgStringLua.Get(item.Value[4]);
                        tmp.Model         = item.Value[5];
                        tmp.OutLineParam  = CfgStringLua.Get(item.Value[6]);
                        tmp.Shader        = item.Value[7];
                        tmp.SharderParam1 = CfgStringLua.Get(item.Value[8]);
                        tmp.SharderParam2 = CfgStringLua.Get(item.Value[9]);
                        tmp.SharderParam3 = CfgStringLua.Get(item.Value[10]);
                        tmp.SharderParam4 = CfgStringLua.Get(item.Value[11]);
                        tmp.SharderParam5 = CfgStringLua.Get(item.Value[12]);
                        tmp.Type          = item.Value[13];
                        tmp.Vfx1          = CfgStringLua.Get(item.Value[14]);
                        tmp.Vfx2          = CfgStringLua.Get(item.Value[15]);
                        tmp.Vfx3          = CfgStringLua.Get(item.Value[16]);
                        tmp.Vfx4          = CfgStringLua.Get(item.Value[17]);
                        tmp.Vfx5          = CfgStringLua.Get(item.Value[18]);
                        tmp.VfxType       = item.Value[19];

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