Пример #1
0
 /// <summary>
 /// Singleton's getInstance method.
 /// </summary>
 public static TransitionManager getInstance()
 {
     if (m_Instance == null)
     {
         m_Instance = new TransitionManager();
     }
     return(m_Instance);
 }
Пример #2
0
        /// <summary>
        /// Starts the transition.
        /// </summary>
        public void run()
        {
            // We find the current start values for the properties we
            // are animating...
            foreach (TransitionedPropertyInfo info in m_listTransitionedProperties)
            {
                object value = info.propertyInfo.GetValue(info.target, null);
                info.startValue = info.managedType.copy(value);
            }

            // We start the stopwatch. We use this when the timer ticks to measure
            // how long the transition has been runnning for...
            m_Stopwatch.Reset();
            m_Stopwatch.Start();

            // We register this transition with the transition manager...
            TransitionManager.getInstance().register(this);
        }