Пример #1
0
        // Dictionary<DateTime, TimeObjHour> hours;



        public TimeObjDay(DateTime _dt, Transform parent, TimeObj _dictValue, bool cascade)
        {
            Transform _t = Transform.Instantiate(MessageMgr.Instance.day,
                                                 EtcMgr.getPosition(_dt),
                                                 EtcMgr.getRotationDay(_dt),
                                                 MessageMgr.Instance.gameRoot) as Transform;

            this.dt        = _dt;
            this.dictValue = _dictValue;
            dGo            = _t.gameObject;
            dictValue.Day  = dGo;
            dGo.SetActive(true);
            dictValue.isDay = true;
            dGo.name        = "D" + dt.Day;
            dHolderGo       = dGo.GetFirstChild();
            dHolderGo.layer = 11;
            dHolderB        = dGo.GetComponent <DayHolderBe>();
            dHolderB.setDateTime(_dt);
            dHolderB.Register(dictValue);

            if (cascade)
            {
                InflateMyHours(true);
            }
        }
Пример #2
0
        public TimeObjHour(DateTime _dt, Transform parent, TimeObj _dictValue, bool cascade)
        {
            // U.Log(" constructor " +_dictValue.m_Date.ToString()  );

            Transform _t = Transform.Instantiate(MessageMgr.Instance.hour,
                                                 EtcMgr.getPosition(_dt),
                                                 EtcMgr.getRotationHour(_dt),
                                                 parent) as Transform;

            dictValue        = _dictValue; // the TimeObj
            hGo              = _t.gameObject;
            dictValue.Hour   = hGo;
            dictValue.isHour = true;

            this.dt = _dt;

            hGo.name = "H" + dt.Hour;

            hHolderGo       = hGo.GetFirstChild();
            hHolderGo.layer = 10;
            hHolderB        = hGo.GetComponent <HourHolderBe>();
            hHolderB.setDateTime(_dt);
            hHolderB.Register(dictValue);

            if (cascade)
            {
                InflateMyMinutes(true);
            }
        }
Пример #3
0
        public TimeObjSecond(DateTime dt, Transform parent, TimeObj _dictValue)
        {
            Transform _t = Transform.Instantiate(MessageMgr.Instance.second,
                                                 EtcMgr.getPosition(dt),
                                                 EtcMgr.getRotationSeconds(dt),
                                                 parent) as Transform;

            dictValue          = _dictValue;
            dictValue.Second   = sGo;
            dictValue.isSecond = true;

            sGo      = _t.gameObject;
            sGo.name = "S" + dt.Second;
            sGo.GetFirstChild().layer = 8;



            sHolderGo = sGo.GetFirstChild();
            sHolderB  = sGo.GetComponent <SecondHolderBe>();
            sHolderB.setDateTime(dt);
        }
Пример #4
0
        // Class knows how to populate seconds but will wait
        public TimeObjMinute(DateTime _dt, Transform parent, TimeObj _dictValue, bool cascade)
        {
            Transform _t = Transform.Instantiate(MessageMgr.Instance.minute,
                                                 EtcMgr.getPosition(_dt),
                                                 EtcMgr.getRotationMinute(_dt),
                                                 parent) as Transform;

            dictValue          = _dictValue; // the TimeObj
            mGo                = _t.gameObject;
            dictValue.Minute   = mGo;
            dictValue.isMinute = true;

            this.dt = _dt;

            mGo.name = "M" + dt.Minute;

            mHolderGo       = mGo.GetFirstChild();
            mHolderGo.layer = 9;
            mHolderB        = mGo.GetComponent <MinuteHolderBe>();
            mHolderB.setDateTime(_dt);
            mHolderB.Register(dictValue);
        }