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

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

            //Debug.Log("Criterion init: " +  ShowCompletion());
        }
Example #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();
                }
            }
        }