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}";
            });
        }
Example #2
0
 private void OnCounterChange(object source, HarvestBoxEventArgs args)
 {
     Dispatch(() => {
         this.HarvestBoxItemsCounter.Content = $"{args.Counter}/{args.Max}";
     });
 }
Example #3
0
        protected virtual void _onCounterChange()
        {
            HarvestBoxEventArgs args = new HarvestBoxEventArgs(this);

            OnCounterChange?.Invoke(this, args);
        }
Example #4
0
 public void UpdateHarvestBoxCounter(object source, HarvestBoxEventArgs e)
 {
     Dispatch(() => {
         HarvestBoxItemsCounter.Content = $"{e.Counter}/{e.Max}";
     });
 }