示例#1
0
 // Start is called before the first frame update
 public void Initialize(Cake cake)
 {
     title.text = cake.title;
     desc.text  = cake.desc;
     StartCoroutine(NetworkAPI.GetImage(cake.image, downloadedImage => image.sprite = downloadedImage));
     GetComponent <Button>().onClick.AddListener(() => ListEntrySelected.Invoke(cake));
 }
示例#2
0
        private IEnumerator PopulateScrollView()
        {
            yield return(StartCoroutine(NetworkAPI.GetJson(output => cakeList = JsonUtility.FromJson <CakeList>("{ \"cakes\": " + output + "}"))));

            CreateCakeListEntry();
        }
示例#3
0
 private void ParseData()
 {
     StartCoroutine(NetworkAPI.GetJson(output => cakeList = JsonUtility.FromJson <CakeList>("{ \"cakes\": " + output + "}")));
 }