Exemplo n.º 1
0
        public void InitBlock()
        {
            Block block = _instantiateBlocks.InstantiateObj(_blockArea).GetComponent <Block>();

            _blocks.Add(block);
            block.Initialize(_nInputSlot, _nOutputSlot);
        }
Exemplo n.º 2
0
        public void InitFileSlot(int nSlot)
        {
            _slots = new FileSlot[nSlot];

            for (int i = 0; i < nSlot; i++)
            {
                if (_instantiateSlots == null)
                {
                    _instantiateSlots = GetComponent <InstantiateObject>();
                }
                _slots[i] = _instantiateSlots.InstantiateObj(transform).GetComponent <FileSlot>();
                _slots[i].transform.localPosition = new Vector3(_slotStartingPosition.localPosition.x, _slotStartingPosition.localPosition.y, _slotStartingPosition.localPosition.z);
                _slots[i].SetYPosition(i);
            }
        }