Пример #1
0
 public void SetData(TargetData tData, bool showCount, bool showUnComplete)
 {
     SetData(tData, showCount);
     if (unComplete && showUnComplete)
     {
         unComplete.enabled = (tData.CurrCount < tData.NeedCount);
     }
 }
Пример #2
0
        public void SetData(TargetData tData, bool showCount)
        {
            string collectedString = (tData.CurrCount > tData.NeedCount) ? tData.NeedCount.ToString() : tData.CurrCount.ToString();

            if (countText)
            {
                countText.text    = tData.NeedCount.ToString();
                countText.enabled = showCount;
            }
        }
Пример #3
0
        public void SetDataInverse(TargetData tData, bool showCount)
        {
            string collectedString = (tData.CurrCount > tData.NeedCount) ? "0" : (tData.NeedCount - tData.CurrCount).ToString();

            if (countText)
            {
                countText.text    = collectedString;
                countText.enabled = showCount;
            }
            if (complete)
            {
                complete.enabled = (tData.CurrCount >= tData.NeedCount);
            }
            if (unComplete)
            {
                unComplete.enabled = false;
            }
        }
Пример #4
0
        public void SetData(TargetData tData, bool showCount)
        {
            string collectedString = (tData.CurrCount > tData.NeedCount) ? tData.NeedCount.ToString() : tData.CurrCount.ToString();

            if (countText)
            {
                // countText.text = collectedString + "/" + tData.NeedCount.ToString();
                countText.text    = collectedString;
                countText.enabled = showCount;
            }
            if (complete)
            {
                complete.enabled = (tData.CurrCount >= tData.NeedCount);
            }
            if (unComplete)
            {
                unComplete.enabled = false;
            }
        }