private void OnCounterChange(object source, HarvestBoxEventArgs args) { bool ApplyAnimation = false; if (args.Counter > Settings.ThresholdHarvest) { ApplyAnimation = true; } Dispatch(() => { if (ApplyAnimation) { ANIM_FERTILIZER_EXPIRE.Begin(HarvestBoxItemsCounter, true); } else { ANIM_FERTILIZER_EXPIRE.Remove(HarvestBoxItemsCounter); } this.HarvestBoxItemsCounter.Content = $"{args.Counter}/{args.Max}"; }); }
private void OnCounterChange(object source, HarvestBoxEventArgs args) { Dispatch(() => { this.HarvestBoxItemsCounter.Content = $"{args.Counter}/{args.Max}"; }); }
protected virtual void _onCounterChange() { HarvestBoxEventArgs args = new HarvestBoxEventArgs(this); OnCounterChange?.Invoke(this, args); }
public void UpdateHarvestBoxCounter(object source, HarvestBoxEventArgs e) { Dispatch(() => { HarvestBoxItemsCounter.Content = $"{e.Counter}/{e.Max}"; }); }