FPS weapons class structure

Okay, i have been learning unity for a couple of months now here and there when i can. I am making a FPS. I have looked at examples from fps kit 1.2 and dastardly bananas code. Its clustered and hard to understand. I would like to approach this from an oop perspective.

I have 5 guns(AK47, M9 pistol, M16, HK-MP5, etc) that have arms attached with animations such as “show”, “hide” , “reload” , “single shot” ,“multiple shot” , “zoom”, “run” , etc animations.

So far, i have attached 2 guns to the first person controller that i will swap out when needed. I also want to drop and pickup weapons.

So, i have 2 questions and you can answer which one you like.

  1. are there any FPS game projects that use oop that i could download and learn from besides unity demos?

  2. In unity, would oop benefit me for a FPS game? if so could someone help me out with a weapons class structure?

This is what i was thinking.

   public class Weapon : Monobehavior  {
              play animation
              drop weapon
              pickup weapon
              }                //not sure what to put in the classes


public class machineGun : Weapon


public class machineGun : Weapon

It appears to me that oop will just complicate things?
Thank you so much. Any help is much appreciated.

The only real reason to introduce polymorphism here would be if each of the guns had a different set of logic involved in playing the animations.

From the information you’ve provided, it seems like all the guns have each of the animations, the only thing that would be different, would be things like fire rate, damage, magazine size, etc. IF that’s the case then these values can just be placed on your weapon class, and set to specific values for each different type of weapon (how you define and use those presets is up to you, be it a separate struct that’s read in, or entire weapon classes serialized out to file. etc).

Hope this helps, if not some more information about the differences in how you want the guns to act might help.