Hi, so I’ve been developing a game with different characters, I’ve created some of them and the menu and everything. What I’ve been doing currently is having a parent collider and setting meshes active based on their order in the children. When creating abilities I just added to this big class and changed stats with a case select. I feel like this isn’t a good approach though and it’s been bugging me. What I think would be good is to have a base object with basic movement and base abilities that all characters have. Then have another thing that is added on for special abilities and modifying the stats of the basic ones. I’ve heard a bit about scriptable objects and enums but really I’m just a beginner so if anyone could point me in the right direction that would appreciated. Thanks!
It’s a bit confusing looking at your question, but it looks like you are going in the right direction. ![]()
I would agree to make a class with all your information, but I would recommend only using integers. In the future, you will want some sort of anti-cheat and ‘serialize’ the class so nobody can edit it. You can only do this with strings, floats, and integers. For defaults, I would recommend setting the class to have a placeholder. something like this would work.
public class playerInformation { int Health = 10; }