Beispiel #1
0
 // Update is called once per frame
 void UpdateDiscrete(DateTime t)
 {
     hoursTransform.localRotation =
         Quaternion.Euler((t = t.AddHours(timeKeeper.getHour())).Hour * degreesPerHour, 0f, 0f);
     minutesTransform.localRotation =
         Quaternion.Euler((t = t.AddMinutes(timeKeeper.getMin())).Minute * degreesPerMinute, 0f, 0f);
     secondsTransform.localRotation =
         Quaternion.Euler((t = t.AddSeconds(timeKeeper.getSec())).Second * degreesPerSecond, 0f, 0f);
 }
Beispiel #2
0
    // Update is called once per frame
    void Update()
    {
        DateTime t = DateTime.Now;

        t = t.AddHours(timeKeeper.getHour());
        t = t.AddMinutes(timeKeeper.getMin());
        t = t.AddSeconds(timeKeeper.getSec());
        t = t.AddDays(timeKeeper.getDay());
        t = t.AddMonths(timeKeeper.getMonth());
        t = t.AddYears(timeKeeper.getYear());


        Time.text = t.ToShortTimeString();
        Date.text = t.ToShortDateString();
    }