What is the BEST way to maintain Player Class (Warrior, Thief, Wizard)

i would like to create a fighting game.
Let say i have 3 characters, each comes with HP, MP, Attack, Description

I understand i can hardcode all the attributes in the script but it’s certainly not a good idea.
What would be the best way to define the variables above in script?

  • Create different class file? Warrior.cs, Thief.cs, each class file shared common attribute (HP, MP, Description) but hardcode the value in each class file
  • Create a global class call ‘CharacterManager.cs’ (with Public attribute HP, MP, Description which i can define in Unity ‘Scene’ Mode). I found this easy and dynamic and without changing the code.

i found that having first approach, i might need to create many CS file (not that i am lazy but is it easy to maintain?)
For second method, i found it cleaner (only 1 file), But the problem is, when i move from scene to another scene, those values need to be define in multiple scenes.

Kindly advice which should be the best way or there are COOLER WAY which i am not aware.

Thanks for the pointer.

Regards,
Weilies

Make a common base class that has the common functionality between your character classes, and use inheritance to extend that class for each character class.