Esempio n. 1
0
        private void OnTriggerExit2D(Collider2D col)
        {
            CellObject temp = col.gameObject.GetComponentInChildren <CellObject>();

            if (temp != null && temp.DropAtType == panelType)
            {
                temp.DropAtType = temp.cellObjectType;
            }
        }
Esempio n. 2
0
        void OnTriggerEnter2D(Collider2D col)
        {
            CellObject temp = col.gameObject.GetComponentInChildren <CellObject>();

            if (temp != null)
            {
                temp.DropAtType = panelType;
            }
        }
Esempio n. 3
0
        private void InstantiateCellObject(GameObject cellPrefabs, Transform grid, ObjectContainedInventory item, EquipWeaponAt equipWeaponAt = EquipWeaponAt.Primary)
        {
            GameObject gameCellObject = Instantiate(cellPrefabs);

            gameCellObject.transform.SetParent(grid, false);
            CellObject cellObject = gameCellObject.GetComponentInChildren <CellObject>();

            cellObject.Inventory = inventory;
            cellObject.Control   = this;
            cellObject.InstantiateCellObjectFromCell(item);
            if (cellPrefabs == cellEquippedWeaponPrefabs)
            {
                cellObject.EquipAt = equipWeaponAt;
            }
        }