Hello, I have a question about OOP. I’m currently creating a combat system and have already implemented some parts using OOP, but I’m unsure about one thing: should I create an m1 function inside the class to handle M1 attacks, or should I keep that logic in a regular script? Alternatively, should I put everything inside module scripts and simply call the functions when needed?
While it obviously depends on what mechanics your game has, my personal recommendation would be to take full advantage of OOP and make your combat modular.
So instead of having an “M1” function, you could simply have an “Attack” function, that takes various parameters like hitbox, damage, and whatever else you may want. Then this function could handle both M1s, but also any other attacks you may add, like block breaks or abilities.