I’m making a fighting game. Each attack has several parameters, including how much damage the move inflicts, whether or not it is a low, middle, or high attack, and so on. I realized that GetComponent is not going to be able to convey all of these variables between two game objects for when each move lands, guarded or not. Is there a way I can manage this?
What do you mean “GetComponent is not going to be able to convey all of these variables”
Its very simple. You make all of the values available as public fields on a script.
When a collision happens, you get the game object for the other collider and use GetComponent to
get a reference to the other’s instance of that script.
From there you just reference them like any public field on an object