✅ Best way to use and compare enums? (Unity)
Hi, currently working with enums in the ubiquitous poker-suit card game type setup that a lot of people have going on.
Two main scripts are involved, the CardClass script and the GameManager script - and the main enum I want to focus on for now is 'Suits'.
My main question is how best to compare it in the case of the player selecting different suits as their chosen suit. So if a player selects spades and then hearts, Clubs and Diamonds now treat the player differently in the game logic.
Do I simply just have a line like
Two main scripts are involved, the CardClass script and the GameManager script - and the main enum I want to focus on for now is 'Suits'.
My main question is how best to compare it in the case of the player selecting different suits as their chosen suit. So if a player selects spades and then hearts, Clubs and Diamonds now treat the player differently in the game logic.
Do I simply just have a line like
using CardClass in the GameManager which grants me access to the same enum, and create a new variable in the manager to keep track of the player's chosen Suits enum?