Any way to declare these variables more efficiently?
Just curious as it doesnt look too clean
6 Replies
Create classes so you don't have to duplicate the variables.
Elaborating on the above, I think they are suggesting that P1 and P2 should both be instances of a "Player" class, and THAT class would have just five copies of this unclean code pattern instead of the ten you hve now.
yeah ive just realised i dont need the DefNames
How would you make properties of those new classed properties be private or public at the level of this class?
i have this class for the player
instead of using P1DefName should i do Team1.Name or smth