UpdateBookThumb() public method

Updates the book thumbnail image
public UpdateBookThumb ( Texture bookThumbTexture ) : void
bookThumbTexture Texture
return void
Exemplo n.º 1
0
    /// <summary>
    /// Loads the texture for the book thumbnail
    /// </summary>
    private void LoadBookThumb()
    {
        if (!mIsBookThumbRequested)
        {
            if (mBookData != null)
            {
                mBookThumb            = new WWW(mBookData.BookThumbUrl);
                mIsBookThumbRequested = true;
            }
        }

        if (mBookThumb.progress >= 1)
        {
            if (mBookThumb.error == null && mBookData != null)
            {
                mBookInformationParser.UpdateBookThumb(mBookThumb.texture);
                mIsLoadingBookThumb = false;
                ShowObject();
            }
        }
    }
Exemplo n.º 2
0
 /// <summary>
 /// Loads the texture for the book thumbnail
 /// </summary>
 private void LoadBookThumb()
 {
     // If book thumb hasn't been requested yet and there is book data assign the url to the book
     // thumb to the URL in the JSON data
     if (!mIsBookThumbRequested)
     {
         if (mBookData != null)
         {
             mBookThumb            = new WWW(mBookData.BookThumbUrl);
             mIsBookThumbRequested = true;
         }
     }
     // If it's still in progress update the text of the book image with the texture from the parsed JSON
     // Render the object
     if (mBookThumb.progress >= 1)
     {
         if (mBookThumb.error == null && mBookData != null)
         {
             mBookInformationParser.UpdateBookThumb(mBookThumb.texture);
             mIsLoadingBookThumb = false;
             ShowObject();
         }
     }
 }