Answer the question
In order to leave comments, you need to log in
How to make a weapon system for an online shooter?
I don’t understand much about this, probably, some kind of hierarchy or some kind of global class is needed so that by changing the parameters you can get different weapons, an assault rifle, a grenade launcher, a shotgun. It's hard to find good material that tells you how to do it the right way, but it doesn't work and that's fine
Answer the question
In order to leave comments, you need to log in
You create a Gun class, create an heir - Pistol, create a new heir - Desert Eagle. According to the hierarchy, you prescribe general parameters - the size of the magazine there, the rate of fire, the mass / speed of the bullet and damage, etc. Well, you implement firing on Update on command in Pistol so that the Fire method is called, and already the heirs each implement it in their own way.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question