Hi. I want to make some skill system for my creatures. I see it like that:
- Write classes for all skills (they inherit from some abstract base class and I want all skills to perform different action, preferably in coroutines if possible)
- Add all of them to some static general dictionary (all skills have unique string id)
- Add some default skills to my creatures (let’s say i want one of them to have Fireball, Kick, Roar, the other to have Acid, Thunder Bolt, Attract etc.)
- And finally let players change specific creature’s skills (remove, add, maybe upgrade) in some menu.
I wanted to make it like this: http://answers.unity3d.com/answers/873150/view.html
But i have some questions:
- Should i create separate script for every skill? Or can i just have all classes in one script with base abstract class? Or maybe abstract class in one script and all inherited classes in other script?
- Do i have to attach skill script with base skill class/inherited skill classes to game object? Because they have to derive from MonoBehaviour if i want to use coroutines (i think)
- How and when i should skills to general dictionary?
Or maybe there’s better way to do it?