Ejemplo n.º 1
0
    public static void DownLoadVoice(string url, string fileName, int roleId, string successFuncName, string failFuncName)
    {
        GameObject        go     = new GameObject("WWWPortraitLoader");
        WWWPortraitLoader loader = go.AddComponent <WWWPortraitLoader>();

        loader.StartCoroutine(loader.DownloadVoicePlus(url, fileName, roleId, successFuncName, failFuncName));
    }
Ejemplo n.º 2
0
    public static void UploadVoice(string strURL, string fileName, byte[] data, string successFuncName, string failFuncName)
    {
        GameObject        go     = new GameObject("WWWPortraitLoader");
        WWWPortraitLoader loader = go.AddComponent <WWWPortraitLoader>();

        loader.StartCoroutine(loader.UploadVoicePlus(strURL, fileName, data, successFuncName, failFuncName));
    }
Ejemplo n.º 3
0
    public static void LoadOnLinePhoto(string strURL, string successFuncName, string failFuncName, object tex, string shaderName, string defaultIconPath)
    {
        GameObject        go     = new GameObject("WWWPortraitLoader");
        WWWPortraitLoader loader = go.AddComponent <WWWPortraitLoader>();
        //判断是否是第一次加载这张图片;
        string imagePath = generateLocalPath(strURL);
        bool   isLocal   = false;

        if (!File.Exists(imagePath))
        {
            isLocal = false;
        }
        else
        {
            isLocal = true;
            strURL  = "file:///" + generateLocalPath(strURL);
        }

        loader.StartCoroutine(loader.DownloadImage(strURL, successFuncName, failFuncName, tex, shaderName, defaultIconPath, isLocal));
    }