Ejemplo n.º 1
0
    //public const string DROPDOWN_TYPE_default = "default";
    //public const string DROPDOWN_TYPE_editorRef = "editorRef";
    //public const string DROPDOWN_TYPE_artRes = "artRes";


    /// <summary>
    /// 获取(DefaultDiglog中)ContentDropdown数据
    /// 通过传入dropdown列表类型,得到具体要填充到dropdown的数据
    /// Dictionary<string,string>两个string分别是显示数据,真实数据,比如对于一个装备来说,显示数据就是玄武甲,真实数据时sql中的ID:1001
    ///
    /// 对于参数type分3个大类型
    /// string 就是手动填写类型
    /// local_开头就是引用编辑器本身资源
    /// res_开头就是引用美术资源
    /// </summary>
    public static Dictionary <string, string> GetContentDropdownDataList(string editorType, string dataType)
    {
        //自定义类型,不需要dropdown数据
        if (dataType.Equals(DROPDOWN_TYPE_custom))
        {
            Log.w("GEditorConfig", "GetDropdownDataList", "type为string,不需要填充dropdown数据,返回null数据", BeShowLog);
            return(null);
        }

        switch (editorType)
        {
        case "skill":
            return(ActiveSkillDataTemplate.GetContentDropdownDataList(dataType));

        //break;
        case "item":
            //return ItemDataTemplate.GetTemplateData();
            break;

        case "task":
            //return TaskDataTemplate.GetTemplateData();
            break;
        }


        Log.e("GEditorConfig", "GetDropdownDataList", "找不到传入类型dataType:" + dataType + "对应的模板,返回null数据!", BeShowLog);

        return(null);
    }
Ejemplo n.º 2
0
    //nsql
    /// <summary>
    /// sql里面一行最大数据
    /// (key+value+type)*150 = 450
    /// 注意这个数必须是3的倍数,否则会出问题比如KVContainer.CheckAndLoadTreeItemData2Local中
    /// </summary>
    //public const int MAX_NUM = 450;
    public static int GetMaxSqlDataNum(string editorType)
    {
        int MAX_NUM = 0;

        switch (editorType)
        {
        case "skill":
            MAX_NUM = ActiveSkillDataTemplate.GetMaxSqlDataNum();
            break;

        case "item":
            MAX_NUM = ItemDataTemplate.GetMaxSqlDataNum();
            break;

        case "task":
            MAX_NUM = TaskDataTemplate.GetMaxSqlDataNum();
            break;

        default:
            Log.e("SQLiteHelper4DataEditor", "GetMaxSqlDataNum", "未知的编辑器类型editorType:" + editorType, BeShowLog);
            break;
        }

        return(MAX_NUM);
    }
Ejemplo n.º 3
0
    public static Dictionary <int, KVData> GetKVTemplateData(string editorType)
    {
        switch (editorType)
        {
        case "skill":
            return(ActiveSkillDataTemplate.GetTemplateData());

            break;

        case "item":
            return(ItemDataTemplate.GetTemplateData());

            break;

        case "task":
            return(TaskDataTemplate.GetTemplateData());

            break;
        }
        return(null);
    }
Ejemplo n.º 4
0
    public static byte[] FilterData(string editorType, Dictionary <string, Dictionary <int, KVData> > orignalData)
    {
        Debug.Log("GEditorConfig.FilterData-->editorType:" + editorType);
        switch (editorType)
        {
        case "skill":
            return(ActiveSkillDataTemplate.FilterExportData(orignalData));

            break;

        case "item":
            return(ItemDataTemplate.FilterExportData(orignalData));

            break;

        case "task":
            return(TaskDataTemplate.FilterExportData(orignalData));

            break;
        }
        return(null);
    }