Пример #1
0
        private void FishingEventHandler(object sender, FishingEvent e)
        {
            Dispatch(() =>
            {
                switch (e.Action)
                {
                case FishingAction.BobberMove:
                    if (!this.GraphFlipper.IsFlipped)
                    {
                        this.Chart.Add(e.Amplitude);
                    }
                    break;

                case FishingAction.Loot:
                    this.flyingFishAnimation.Start();
                    this.LootingGrid.Visibility = Visibility.Visible;
                    break;

                case FishingAction.Cast:
                    this.Chart.ClearChart();
                    this.LootingGrid.Visibility = Visibility.Collapsed;
                    this.flyingFishAnimation.Stop();
                    setImageBackgroundColour = true;
                    break;
                }
                ;
            });
        }
Пример #2
0
 public void RaiseEvent(FishingEvent ev)
 {
     FishingEventHandler?.Invoke(ev);
 }