public void PickUpBrick() { if (playerInventory.HasRoomForMoreBricks()) { playerInventory.AddBrick(InputManager.brickInContact); playerData.bricksInInventory = playerInventory.bricksCount; } }
private void OnTriggerEnter(Collider other) { if (other.gameObject.tag == "Brick" && enemyInventory.HasRoomForMoreBricks()) { enemyInventory.AddBrick(other.gameObject); BricksOnGroundController.RemoveBrick(other.gameObject.transform); } }