Esempio n. 1
0
 private void SetNextLook()
 {
     NopeSound();
     inputEnabled      = false;
     textInfo.text     = "";
     textLocation.text = "";
     textPlace.text    = "";
     textNameBig.text  = "";
     myDateStats       = DateManager.Instance.GetByIndex(countChar);
     currChar          = DateManager.Instance.GetByIndex(countChar).ProfileImage;
     mainImage.GetComponent <SpriteRenderer>().sprite = currChar;
     textInfo.gameObject.SetActive(false);
     //textInfo.text = DateManager.Instance.GetByIndex(countChar).Description;
     if (countChar + 1 < DateManager.Instance.DatesCount)
     {
         countChar++;
     }
     else
     {
         countChar = 0;
     }
     mainImage.localPosition = resetPosition;
     DOTween.Kill(mainImage);
     mainImage.eulerAngles = Vector3.zero;
     mainImage.DOLocalRotate(new Vector3(0f, 360f, 0f), 1f, RotateMode.LocalAxisAdd);
     mainImage.DOLocalMove(startPosition, 1.2f).SetEase(Ease.OutExpo).OnComplete(OnSetupComplete);
 }
Esempio n. 2
0
        /// <summary>
        /// Return a set of stats (Earliest, Latest, Range, Count) on a collection of dates.
        /// </summary>
        /// <typeparam name="T">The Type of the data in the collection</typeparam>
        /// <param name="data">The data to analyse</param>
        /// <param name="_selector">The selctor to get a DateTime from the data</param>
        /// <returns>The stats on the data</returns>
        public static DateStats GetStats <T>(this IEnumerable <T> data, Func <T, DateTime> _selector)
        {
            var retval = new DateStats();

            foreach (var row in data)
            {
                var val = _selector(row);
                retval.Accumulate(val);
            }

            return(retval);
        }