public bool DoesItemExistOnGrid(Item_GridHelper itemToCheck) { foreach(GridBlockItem block in UserBase.I.gridBlocksContainer.gridBlockItems) if (block.myBlock.myItem != null && block.myBlock.myItem.GetItemType() == itemToCheck.GetItemType() && block.myBlock.myItem.itemID == itemToCheck.itemID) return true; return false; }
void OnFingerDragEnd(int fingerIndex, Vector2 fingerPos) { if (currentDragObject != null) currentDragObject.EndMoving(); currentDragObject = null; Grid.I.UpdateGridData(); if(fingerIndex != 0) return; }