What if you had both IceSpell and FireSpell attached to your player?

Would you then have to do something like:
var availableSpells = GetComponents<Spell>();
And then look between them to see which you wanted to use?

In our paradigm, spells (abilities) aren’t “attached” to the player gameobject, but are instead kept in the ActionStore. They are inventory items.
I’ll be the first to admit, we’re a bit weak on fleshing out Actions/Abilities in this course, but in the course Shops and Abilities, Sam really fleshes out Abilities.

1 Like

Ok, great! I was just curious if you attached more than one spell to the character if you were to use GetComponents if they would all be returned in an array.

I look forward to getting to the Shops course though, thanks!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms