/// <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; } }
/// <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); } }
/// <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; } }