public override void SetTime(System.DateTime time)
    {
        var diffInSeconds = (time - setTime).TotalSeconds;

        if (diffInSeconds >= 1)
        {
            setTime = time;

            // If a difference between a new and already set time is around 1 second we will animate a seconds' shift on a spiral.
            if (diffInSeconds < 1.1f)
            {
                digitHolders[digitHolders.Count - 1].digit.GetComponent <Text>().text = GetCorrectSeconds(time.Second).ToString("D2");
                DigitHolder.StartShiftReaction(digitHolders[0]);
            }
            else
            {
                SetupDigits();
            }
        }
    }
Exemple #2
0
 public static void StartShiftReaction(DigitHolder targetHolder)
 {
     targetHolder.ShiftDigitToNextHolder();
 }