Ejemplo n.º 1
0
        public void ThrowPole(FishingMan man)
        {
            Console.WriteLine("Begin To Throw!");

            if (new Random().Next() % 2 == 1)
            {
                var type = (FishType) new Random().Next(0, 5);

                Console.WriteLine("Fish got it");
                if (FishingEvent != null)
                {
                    var fishingEventData = new FishingEventData {
                        FishType = type, FishingMan = man
                    };
                    // FishingEvent (new FishingEventData { FishType = type, FishingMan = man });
                    EventBusManager.Default.Trigger <FishingEventData> (fishingEventData);
                }
            }
            else
            {
                Console.WriteLine("Got nothing this time!");
            }
        }
Ejemplo n.º 2
0
 public void Update(FishingEventData fishingEventData)
 {
     Count++;
     System.Console.WriteLine($"{Name}: Got a Fish, Fish type is {fishingEventData.FishType}, Fish Count is {Count}");
 }