public int GetCounter(CounterTag tag) { if (_countersDictionary.ContainsKey(tag) == false) { return(0); } return(_countersDictionary[tag].Counter); }
public void UpdateCounterText(CounterTag tag, int count) { if (_counterTextsDictionary.ContainsKey(tag) == false) { return; } _counterTextsDictionary[tag].Counter.text = tag.ToString() + ": " + count; }
public void Decrement(CounterTag tag, int value) { if (_countersDictionary.ContainsKey(tag) == false) { return; } var decrementedValue = _countersDictionary[tag].Counter -= value; UIManager.Instance.UpdateCounterText(tag, decrementedValue); }