Beispiel #1
0
        public void add_item(
            MonoBehaviour in_item
            )
        {
            Table_cell cell = create_cell();

            cell.put_item(in_item);
        }
Beispiel #2
0
        private Table_cell create_cell()
        {
            Table_cell cell = table_cell_prefab.provide_new <Table_cell>();

            /* cell.name =
             *  String.Format("canvas {0}",in_item.name); */
            cell.transform.SetParent(canvas.transform, false);
            cells.Add(cell);
            return(cell);
        }
Beispiel #3
0
        public void remove_item(
            MonoBehaviour in_item
            )
        {
            Table_cell removed_cell = null;

            foreach (Table_cell cell in cells)
            {
                if (cell.item == in_item)
                {
                    removed_cell = cell;
                }
            }
            if (removed_cell != null)
            {
                cells.Remove(removed_cell);
                removed_cell.destroy();
            }
        }