コード例 #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
ファイル: DataHandler.cs プロジェクト: SoulfulBrown/CodeTest
        private IEnumerator PopulateScrollView()
        {
            yield return(StartCoroutine(NetworkAPI.GetJson(output => cakeList = JsonUtility.FromJson <CakeList>("{ \"cakes\": " + output + "}"))));

            CreateCakeListEntry();
        }
コード例 #3
0
ファイル: DataHandler.cs プロジェクト: SoulfulBrown/CodeTest
 private void ParseData()
 {
     StartCoroutine(NetworkAPI.GetJson(output => cakeList = JsonUtility.FromJson <CakeList>("{ \"cakes\": " + output + "}")));
 }