Пример #1
0
        public void reset()
        {
#if FULLLOG
            MoreDebug.Log(Description);
#endif
            actualAmount  = StartAmount;
            TargetReached = false;
            // no effect on recording or events
        }
Пример #2
0
        public string ShowCompletion()
        {
#if FULLLOG
            MoreDebug.Log(Description);
#endif

            string s = actualAmount + " of " + TargetAmount;
            return(s);
        }
Пример #3
0
        public void init(UnityAction eventToTrigger)
        {
#if FULLLOG
            MoreDebug.Log(Description);
#endif
            onCriterionMet.AddListener(eventToTrigger);

            //Debug.Log("Criterion init: " +  ShowCompletion());
        }
Пример #4
0
        public void Increment()
        {
#if FULLLOG
            MoreDebug.Log(Description);
#endif
            if ((!TargetReached) && recording)
            {
                actualAmount++;
                onAmountChange.Invoke();
                Debug.Log("Event fired:" + ShowCompletion());
                if (actualAmount >= TargetAmount)
                {
                    TargetReached = true;
                    onCriterionMet.Invoke();
                }
            }
        }