コード例 #1
0
 public void SetContent(LevelBrowser.ListElement data)
 {
     if (data == null)                                      //Exit if told to not display anything
     {
         gameObject.SetActive(false);
         return;
     }
     gameObject.SetActive(true);
     //idLabel.text = data.id.ToString();
     titleLabel.text      = data.title;
     authorLabel.text     = data.author;
     dateLabel.text       = data.date;
     playsLabel.text      = data.plays.ToString();
     ratingBar.fillAmount = (float)data.likes / (data.likes + data.dislikes);
 }
コード例 #2
0
        public void SetContent(LevelBrowser.ListElement data)
        {
            if (anim == null)
            {
                anim = GetComponent <Animator>();
            }

            foreach (Button button in GetComponentsInChildren <Button>())
            {
                button.interactable = true;
            }

            anim.SetTrigger("Loaded");
            descriptionLabel.text = data.description;

            //ALEX REMOVE THESE LINES
            animDebugText.text = "Trigger: Loaded";
            //WHEN THE ANIMATIONS ARE DONE
        }