I’m making a local multiplayer game (for the first time) and I have a quick question as to how I should set up my scripts and project in general to work well.
Basically I have a script for movement, shooting, GUI and so on. I have set up a second movement script for player 2 (essentially the same script with different inputs). Is this a good way to go about setting up a project like this?
I’m asking because most of my scripts dont actually refer to the player gameobject just the object that they are attached too, so if I set up a set of duplicate scripts that essentially have a different name but still do the same thing so that player 2 will have its own health and weapon select is this good practice? Or should I for example have a shooting script that then refers to each player individually through gameobject.find or a public game object and drag each player into the inspector?
Thanks in advance!