コード例 #1
0
        protected virtual UICell createItem(object context, int i)
        {
            Transform tf = spawn();

            if (tf == null)
            {
                return(null);
            }
            GameObject go = tf.gameObject;

            go.SetActive(true);
            tf.SetParent(content);
            tf.localPosition = Vector3.zero;
            tf.localScale    = Vector3.one;
            UICell t = go.GetComponent <UICell>();

            //go.name = i.ToString();
            t.Init(this);
            t.SetData(i, context, i == _curSelectIndex);
            _cells.Add(t);
            return(t);
        }