What is more optimized?
Dear Adobe users,
I want to make a turn based game. In the game you have more then one frame, but the vars of one frame need to be ajusted by another frame. I thought, lets make a class as a var holder, named varHolder.as. Then put all the vars that I need for more frames in that class and import it to the framecontroll classes.
My questions are:
What is more optimized?
Everytime calling to the class (example: varHolder.wood ==1 )
Or,
creating new vars, giving them the value of the varHolders var and then at the end of the turn send the vars value's back to the varHolder.as. (example: wood = varHolder.wood
Or,
Is there a better way of doing this
?
I'm really just a starter so sorry if this is a noob question. I personally think the second option, because then you don't have to call the other class all the time. Although I don't know is that is hard on your pc or not.
Hope you guys/girls can help,
Casper ![]()