Hello, I’m quite new to Unity and C#. Now the player character in my game has a bunch of abilities like Restore Health, Spin Attack, AOE Attack, Auto Aim, etc. All abilities are functions in PlayerAbilities class attached to the player prefab. Player can use those by defeating a specific number of enemies and the screen will show 3 random abilities from available ones. Player then can press the button to use it.
Now I’m trying to do 2 thing but very confused and not sure what to do.
-
I’d like to have an icon for each ability, so it’ll be shown on screen when player can use it. But I’m not sure how to put a sprite in a function.
-
I’d like to do a shop for abilities, so player can use in-game money from defeating enemies to buy new abilities. (Each player character starts with 3 different starting abilities. When they bought new ones, the new abilities will be available (extend the ability pool) and can be randomized to use. I suppose I have to do a list for that, correct?
If anyone could help me and show how the structure of the code involving this system would look like, that’d be so great. I’m stuck with this problem quite a while.