コード例 #1
0
        public static float GetFloatFromMin(int timeOfDay)
        {
            (int hour, int min) = SunStudyUIController.GetHourMinute(timeOfDay);
            float floatval = hour + (float)min / 60;

            return(floatval);
        }
コード例 #2
0
        void Start()
        {
            m_HourDialControl.onSelectedValueChanged.AddListener(OnHourDialValueChanged);
            m_MonthDialControl.onSelectedValueChanged.AddListener(OnMonthDialValueChanged);
            m_ResetButton.onClick.AddListener(OnResetButtonClicked);

            m_MainButton.onClick.AddListener(OnMainButtonClicked);
            m_SecondaryButton.onClick.AddListener(OnSecondaryButtonClicked);

            int min, day;

            (m_DefaultHour, min)             = SunStudyUIController.GetHourMinute(UIStateManager.current.stateData.sunStudyData.timeOfDay);
            (m_DefaultMonth, day)            = SunStudyUIController.GetMonthDay(DateTime.Now.Year, UIStateManager.current.stateData.sunStudyData.timeOfYear);
            m_HourDialControl.selectedValue  = m_DefaultHour;
            m_MonthDialControl.selectedValue = m_DefaultMonth;
        }