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.
-
are there any FPS game projects that use oop that i could download and learn from besides unity demos?
-
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 {
fire
reload
ammo
play animation
damage
drop weapon
pickup weapon
} //not sure what to put in the classes
Further,
public class machineGun : Weapon
and
public class machineGun : Weapon
It appears to me that oop will just complicate things?
Thank you so much. Any help is much appreciated.