예제 #1
0
        public void UpdateContent(BusinessCardData businessCardData)
        {
            _businessCardData = businessCardData;

            _image.sprite = SpriteResource.Instance.GetData(MagicWallManager.FileDir + businessCardData.address);
            _index        = businessCardData.Index;

            if (_index > 0)
            {
                GetComponent <RectTransform>().anchoredPosition = backVectorRight;
            }
        }
예제 #2
0
        public void UpdateContents(string[] images)
        {
            if (pool == null)
            {
                pool = new List <BusinessCardCellAgent>();
            }


            for (int i = 0; i < images.Length; i++)
            {
                //创建card
                BusinessCardCellAgent businessCardCellAgent = Instantiate(
                    _cellPrefab,
                    _contentContainer
                    ) as BusinessCardCellAgent;
                BusinessCardData businessCardData = new BusinessCardData();
                businessCardData.Index   = i;
                businessCardData.address = images[i];
                businessCardCellAgent.UpdateContent(businessCardData);
                pool.Add(businessCardCellAgent);
            }
        }