// Update is called once per frame
    void Update()
    {
        if (_kufrPosition == Places.POKOJ && _heldItems.Contains(Items.KufrRozbaleny))
        {
            _kufrPosition = "";
        }

        if (_shouldGetKufr)
        {
            Debug.Log("Should get kufr = " + _shouldGetKufr);
            if (!_wasKufrInBedroom)
            {
                _heldItems.Add(Items.KufrZabaleny);
            }
            _shouldGetKufr = false;
            HandleItemChange();
        }

        switch (_uicontroller._actualPlace.Name)
        {
        case Places.SCHODY:
            if (_heldItems.Contains(Items.KufrRozbaleny))
            {
                _heldItems.Remove(Items.KufrRozbaleny);
                HandleItemChange();
            }
            break;

        case Places.K_POKOJUM:
            if (!_heldItems.Contains(Items.KufrRozbaleny) && _kufrPosition == Places.K_POKOJUM)
            {
                if (!_wasKufrInBedroom)
                {
                    _heldItems.Add(Items.KufrRozbaleny);
                }
                HandleItemChange();
            }
            break;

        case Places.CHODBA:
            if (!_heldItems.Contains(Items.KufrRozbaleny) && _kufrPosition == Places.CHODBA)
            {
                if (!_wasKufrInBedroom)
                {
                    _heldItems.Add(Items.KufrRozbaleny);
                }
                HandleItemChange();
            }
            break;

        case Places.POKOJ:
            if (_heldItems.Contains(Items.KufrRozbaleny))
            {
                _heldItems.Remove(Items.KufrRozbaleny);
                _wasKufrInBedroom = true;
            }
            break;
        }

        _kufrPosition = _heldItems.Contains(Items.KufrRozbaleny) ? _uicontroller._actualPlace.Name : _kufrPosition;
        Debug.Log("'Kufr position is: " + _kufrPosition);

        if (Input.GetMouseButtonDown(0))
        {
            RaycastHit hit;
            Ray        ray = Camera.main.ScreenPointToRay(Input.mousePosition);
            if (Physics.Raycast(ray, out hit, RayLength, LayerMask))
            {
                switch (hit.collider.name)
                {
                case "PropiskaCollider":
                    GameObject.Find("PropiskaCollider").SetActive(false);
                    if (!_heldItems.Contains(Items.Propiska))
                    {
                        _heldItems.Add(Items.Propiska);
                        HandleItemChange();
                    }

                    break;

                case "KlicCollider":
                    GameObject.Find("KlicCollider").SetActive(false);
                    if (!_heldItems.Contains(Items.Klic))
                    {
                        _heldItems.Add(Items.Klic);
                        HandleItemChange();
                    }

                    break;

                case "NuzkyCollider":
                    GameObject.Find("NuzkyCollider").SetActive(false);
                    if (!_heldItems.Contains(Items.Nuzky))
                    {
                        _heldItems.Add(Items.Nuzky);
                        HandleItemChange();
                    }

                    break;

                case "SroubovakCollider":
                    GameObject.Find("SroubovakCollider").SetActive(false);
                    if (!_heldItems.Contains(Items.Sroubovak))
                    {
                        _heldItems.Add(Items.Sroubovak);
                        HandleItemChange();
                    }
                    break;

                case "NumberOfDoc":
                    StartCoroutine(NumberController.ChangeNumberToKey());
                    break;

                case "DocToSign":
                    if (_heldItems.Contains(Items.Propiska))
                    {
                        NumberController.SignDoc(hit.collider.gameObject);
                        hit.collider.gameObject.SetActive(false);
                    }
                    break;

                case "TlacitkoUp":
                    if (_uicontroller._places.Vytah.State == 1)
                    {
                        _uicontroller.ChangePlace(Places.VYTAH2);
                    }
                    break;

                case "Hrad":
                    GameObject.Find("Hrad").SetActive(false);
                    _uicontroller.DestroyCastle();
                    break;

                case "StvrzenkaUbytovani":
                    GameObject.Find("UbytovaniText").GetComponent <TextMesh>().text = "Stvrzeno";
                    _uicontroller.Ubytovat();
                    _heldItems.Remove(Items.KufrRozbaleny);
                    break;
                }
            }
        }
    }