Example #1
0
 static void Main(string[] args)
 {
     CfgMgr.DataDir.Dir      = "F:/cfggen.git/trunk/data";
     CfgMgr.DataDir.Encoding = "utf-8";
     System.Console.WriteLine("++++");
     CfgMgr.Load();
 }
Example #2
0
 public static CfgMgr GetIns()
 {
     if (null == instance)
     {
         instance = new CfgMgr();
     }
     return(instance);
 }
Example #3
0
    SkillInfoReader( )
    {
        Reflect = new Dictionary <string, int>();
        List <string[]> CfgInfo = CfgMgr.GetCfgInfo(this.ToString());

        foreach (string[] LineInfo in CfgInfo)
        {
            Reflect.Add(LineInfo[2], Convert.ToInt32(LineInfo[0]));
        }
    }
Example #4
0
    // Use this for initialization
    void Start()
    {
        //只执行一次
        CfgMgr.GetIns().LoadAllConfig();

        //获取配置
        buffConfig cf = CfgMgr.GetCfg().Getbuff(1);

        Debug.LogError(cf.buff_name);

        testConfig tc = CfgMgr.GetCfg().Gettest(1);

        Debug.LogError(tc.buff_name);
    }
Example #5
0
 public float GetHitBackSpeed(int InLine)
 {
     InLine = InLine - 1;
     return(((float)Convert.ToInt32(CfgMgr.GetData("NpcProptyReader", InLine, 6))) / 1000);
 }
Example #6
0
 public int GetVirtical(int InLine)
 {
     InLine = InLine - 1;
     return(Convert.ToInt32(CfgMgr.GetData("NpcProptyReader", InLine, 5)));
 }
Example #7
0
 public int GetAttack(int InLine)
 {
     InLine = InLine - 1;
     return(Convert.ToInt32(CfgMgr.GetData("NpcProptyReader", InLine, 4)));
 }
Example #8
0
 public int GetHealthy(int InLine)
 {
     InLine = InLine - 1;
     return(Convert.ToInt32(CfgMgr.GetData("NpcProptyReader", InLine, 3)));
 }
Example #9
0
 public string GetName(int InLine)
 {
     InLine = InLine - 1;
     return(CfgMgr.GetData("NpcProptyReader", InLine, 1));
 }
Example #10
0
 public int GetVioPer(int InLine)
 {
     InLine = InLine - 1;            return(Convert.ToInt32(CfgMgr.GetData("SkillInfoReader", InLine, 4)));
 }
Example #11
0
 public string GetScrName(int InLine)
 {
     InLine = InLine - 1;            return(CfgMgr.GetData("SkillInfoReader", InLine, 2));
 }