SetRating() public méthode

Sets textures to the star object to render the corresponding rating
public SetRating ( int rating ) : void
rating int
Résultat void
Exemple #1
0
 /// <summary>
 /// Updates the book data in the bookObject gameObject
 /// </summary>
 public void UpdateBookData(BookData bookData)
 {
     if (mBookObject != null)
     {
         mBookTitle.text          = bookData.BookTitle;
         mBookAuthor.text         = bookData.BookAuthor;
         mBookRegularPrice.text   = string.Format("${0}", bookData.BookRegularPrice);
         mBookOverallRatings.text = string.Format("( {0} ratings )", bookData.BookOverallRating);
         mBookYourPrice.text      = string.Format("${0}", bookData.BookYourPrice);
         mBookStarsRating.SetRating(bookData.BookRating);
     }
 }