Exemplo n.º 1
0
    private void InitializeEquipmentNameStrs()
    {
        ConfigDatabase.DelayLoadFileDelegate delayLoadFileDel = ConfigDelayLoader.DelayLoadConfig;
        string          str        = "";
        int             fileFormat = 0;
        IFileLoader     fileLoader = delayLoadFileDel(typeof(EquipmentConfig), out str, out fileFormat);
        EquipmentConfig config1    = ConfigDatabase.LoadConfig <EquipmentConfig>(ConfigDatabase.DefaultCfg, fileLoader, fileFormat, str);

        config1.GetType();
        //int weaponCount = 0;
        //for (int i = 0; i < ConfigDatabase.DefaultCfg.EquipmentConfig.equipments.Count; i++)
        //{
        //    EquipmentConfig.Equipment equipmentCfg = ConfigDatabase.DefaultCfg.EquipmentConfig.equipments[i];
        //    if (equipmentCfg.type == EquipmentConfig._Type.Weapon)
        //    {
        //        weaponCount++;
        //    }
        //}
        //equipmentStrs = new string[weaponCount];
        //equipmentIds = new int[weaponCount];
        //for (int i = 0; i < ConfigDatabase.DefaultCfg.EquipmentConfig.equipments.Count; i++)
        //{
        //    EquipmentConfig.Equipment equipmentCfg = ConfigDatabase.DefaultCfg.EquipmentConfig.equipments[i];
        //    if (equipmentCfg.type == EquipmentConfig._Type.Weapon)
        //    {
        //        string name = ItemInfoUtility.GetAssetName(equipmentCfg.id);
        //        equipmentIds[i] = equipmentCfg.id;
        //        equipmentStrs[i] = name;
        //    }
        //}
    }