I am working on a combat system which uses a mixture of tags/attributes and temporary instances to determine player input/action. For instance, when a player gets stunned, I add a tag called “Stunned” onto their character, and whenever they try to move/attack I check to see if their character has the “Stunned” tag.
On the other hand, whenever a player clicks their mouse, I create a local instance in the player’s character called “mouseDown”, because it is imperative that I know if they are holding their mouse button down during a certain combo. However, I am unsure as to how else I can approach this – would it be more efficient to add a tag to the character called “mouseDown” instead of creating a local instance every time a player clicks?