I'm a newcomer to this forums and I hope that there are others more experienced in entity component systems over here. I've just started working on a game using the Ash framework and I've sort of gotten a grasp on it. The game is a sidescroller action "aim with mouse" type of game but with spells instead of guns. I'm having a hard time making a spell system though. I'll use a simple example here:
the main character has 3 spells: fireball, water bolt and freeze . Now the "wizard entity" has a child entity (basically they share the same position component but with an offset) called "staff". Now my staff entity also has a "staff component" which holds all the properties of the spell im about to cast including its lifetime, element, and cooldown.
Now how would I make it that pressing "Q" or "E" changes my currently equipped spell?