public void changeMediaType() { mr = GetComponent<MediaRetriever> (); mr.incrementMediaType(); mr.incrementTitle(); if(currentMediaType == (int)MediaRetriever.MediaTypes.Magazine) mr.loadMostRecentArticle(mr.currentTitleID, updateCurrentPages); else if(currentMediaType == (int)MediaRetriever.MediaTypes.Book) { currentBookArray = ResolveTextSize (mr.getCurrentBook(), 50); currentLeftPage = 0; } }
public void changeBook() { // TextMesh tm = GameObject.Find("pageText").GetComponent<TextMesh> (); mr = GetComponent<MediaRetriever> (); mr.incrementTitle(); if(currentMediaType == (int)MediaRetriever.MediaTypes.Magazine){ currentArticle = mr.getCurrentArticle (updateCurrentPages); } else if (currentMediaType == (int)MediaRetriever.MediaTypes.Book) { // currentBook = mr.getCurrentBook (); currentBookArray = ResolveTextSize (mr.getCurrentBook(), 50); lastLeft = ""; lastRight = ""; currentLeftPage = 0; } // tm.text = mr.getCurrentTitle(); // tm.richText = true; }
// Use this for initialization void Start() { mr = GameObject.Find("Retriever").GetComponent<MediaRetriever> (); currentMediaType = mr.getCurrentMediaType(); if(currentMediaType == (int)MediaRetriever.MediaTypes.Magazine) mr.loadMostRecentArticle(mr.currentTitleID, updateCurrentPages); else if(currentMediaType == (int)MediaRetriever.MediaTypes.Book) { currentBookArray = ResolveTextSize (mr.getCurrentBook(), 50); } }