public void reset() { #if FULLLOG MoreDebug.Log(Description); #endif actualAmount = StartAmount; TargetReached = false; // no effect on recording or events }
public string ShowCompletion() { #if FULLLOG MoreDebug.Log(Description); #endif string s = actualAmount + " of " + TargetAmount; return(s); }
public void init(UnityAction eventToTrigger) { #if FULLLOG MoreDebug.Log(Description); #endif onCriterionMet.AddListener(eventToTrigger); //Debug.Log("Criterion init: " + ShowCompletion()); }
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(); } } }