Пример #1
0
    // Update is called once per frame
    void UpdateUI()
    {
        if (_selectedRoom != null)
        {
            _roomUI.SetActive(true);
            _standardUI.SetActive(false);
            _roomNumber.text = _selectedRoom.room.roomNumber;

            for (int i = 0; i < _dayPanels.Length; ++i)
            {
                GameObject      empty   = new GameObject("Day & Date");
                TextMeshProUGUI dayDate = empty.AddComponent <TextMeshProUGUI>();
                dayDate.text           = DateTimeExtension.DateToString(DateTimeExtension.GetDateOfLastDay((DayOfWeek)(i + 1)));
                empty.transform.parent = _dayPanels[i].transform;
            }
        }
        else
        {
            _roomUI.SetActive(false);
            _standardUI.SetActive(true);
        }
    }