Beispiel #1
0
        public Tween From(object start)
        {
            foreach (PropertyInfo property in start.GetType().GetProperties())
            {
                Lerper lerper = Lerper(property);
                lerper.From = System.Convert.ChangeType(property.GetValue(start), lerper.DataType);
            }

            return(this);
        }
Beispiel #2
0
        public Tween To(object target, System.Func <float, float> easing = null)
        {
            foreach (PropertyInfo property in target.GetType().GetProperties())
            {
                Lerper lerper = Lerper(property);
                lerper.To = System.Convert.ChangeType(property.GetValue(target), lerper.DataType);

                if (easing != null)
                {
                    lerper.Easing = easing;
                }
            }

            return(this);
        }