예제 #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
파일: Ocean.cs 프로젝트: errcw/fishing-girl
 /// <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
파일: Timer.cs 프로젝트: errcw/fishing-girl
        /// <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;
            }
        }