Beispiel #1
0
    protected virtual ScrollListItemView <T> InstantiateItemView()
    {
        ScrollListItemView <T> viewInstance = Instantiate(m_ScrollListItemPrefab).GetComponent <ScrollListItemView <T> >();

        viewInstance.transform.SetParent(transform);
        viewInstance.transform.localPosition = Vector3.zero;
        viewInstance.transform.localScale    = Vector3.one;
        return(viewInstance);
    }
        protected override void UpdateItemView(ScrollListItemView <PlayerIdentity> itemView, object value)
        {
            base.UpdateItemView(itemView, value);
            PlayerIdentity playerIdentity = (PlayerIdentity)value;

            if (PhotonNetwork.player.Equals(playerIdentity.Player))
            {
                RectTransform rectTransform = (RectTransform)itemView.transform;
                onMyIdentityTransformUpdate.Invoke(rectTransform);
                m_HasMe = true;
            }
            else
            {
                itemView.transform.SetParent(transform);
            }
        }
Beispiel #3
0
 protected virtual void UpdateItemView(ScrollListItemView <T> itemView, object value)
 {
     itemView.UpdateItem(value);
 }