My game have different types of enemy, and each one has a different script attached to control their behavior, but they use some of the same thing like bullet or deadFX, my question is which is the best way to access these shared gameobject variables?
Do I need to create the same variables in each of the enemy behavior script like:
var bullet : GameObject;
var deadFx : GameObject;
//...etc
or just create them in one public script, and all the other script can access these variables.
Does anyone can show me the example? Thanks a lot.