示例#1
0
        private void OnTriggerExit2D(Collider2D col)
        {
            CellObject temp = col.gameObject.GetComponentInChildren <CellObject>();

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

            if (temp != null)
            {
                temp.DropAtType = panelType;
            }
        }
示例#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;
            }
        }