is it better that create one script for all variables(player object) or not?
I have many charachters that some of them can attack, defend and all of them can move. I would like to use component based design and implement defend,attack and move components(classes). It is better I create one script player and put all variables like attack_power,defend_power,speed,range and etc in this or put the variables in components. For example attack_power and attack_range in attack component and defend_power and defend_range in defend components and speed in move component? if I put all varialbes in one script(player) I will have some problems because some characters don't have defend mode or attack mode so theses variables will be empty or invalid.
Your answer
Follow this Question
Related Questions
Making camera follow and rotate player 0 Answers
How do you move the camera with the player. Whats wrong with my code? 0 Answers
Unity5 Collider error 0 Answers
Set Component property using a var 0 Answers
how i can resolve this prob? 0 Answers