Пример #1
0
 /// <summary>
 /// Adds the value of the caught fish to the money available
 /// </summary>
 private void OnFishingEvent(object stateObj, FishingEventArgs e)
 {
     if (e.Event == FishingEvent.FishCaught)
     {
         Amount += e.Fish.Description.Value;
     }
 }
Пример #2
0
 /// <summary>
 /// Removes a fish from the ocean when it is caught or eaten.
 /// </summary>
 private void OnFishingEvent(object stateObj, FishingEventArgs e)
 {
     if (e.Event == FishingEvent.FishCaught ||
         e.Event == FishingEvent.FishEaten)
     {
         RemoveFish(e.Fish);
         AddFishToRespawn(e.Fish);
     }
 }
Пример #3
0
        /// <summary>
        /// Adds or removes time based on the event.
        /// </summary>
        private void OnFishingEvent(object stateObj, FishingEventArgs e)
        {
            switch (e.Event)
            {
            case FishingEvent.FishCaught:
                Time += GetTimeBonus(e.Fish);
                break;

            case FishingEvent.LureBroke:
                Time -= LureBreakPenalty;
                break;
            }
        }