CrossTheLine
CrossTheLine
CC#
Created by CrossTheLine on 2/7/2023 in #help
✅ Best way to use and compare enums? (Unity)
I did public CardClass.Suits playerSuit; so now I can properly initialize the value.
40 replies
CC#
Created by CrossTheLine on 2/7/2023 in #help
✅ Best way to use and compare enums? (Unity)
Ah yep, thank you, now I understand.
40 replies
CC#
Created by CrossTheLine on 2/7/2023 in #help
✅ Best way to use and compare enums? (Unity)
Well, I'm simply confused and asking about it, I guess. Because I've defined the public enum Suits { heart, spade, diamond, club}; in the CardClass, I don't know if the best approach to this in the Game Manager is to quite literally, just copy-paste the exact same enum over? I'm not sure how one would refer to the enum without specifying what it is somehow
40 replies
CC#
Created by CrossTheLine on 2/7/2023 in #help
✅ Best way to use and compare enums? (Unity)
that way i dont need to drag the whole class in
40 replies
CC#
Created by CrossTheLine on 2/7/2023 in #help
✅ Best way to use and compare enums? (Unity)
Oh, so something like Using CardClass.Suits; then?
40 replies
CC#
Created by CrossTheLine on 2/7/2023 in #help
✅ Best way to use and compare enums? (Unity)
In which case my intellisense tells me to use using static instead which Ero says is wrong
40 replies
CC#
Created by CrossTheLine on 2/7/2023 in #help
✅ Best way to use and compare enums? (Unity)
Sorry, I'm a bit confused by that. Do you mean in the gameManager where I'm wanting to check the enum?
40 replies
CC#
Created by CrossTheLine on 2/7/2023 in #help
✅ Best way to use and compare enums? (Unity)
In that case, should I be using using static CardClass as the option instead?
40 replies
CC#
Created by CrossTheLine on 2/7/2023 in #help
✅ Best way to use and compare enums? (Unity)
unity doesn't seem to bar me from using cardclass, but it tells me i should 'using static CardClass' instead
40 replies
CC#
Created by CrossTheLine on 2/7/2023 in #help
✅ Best way to use and compare enums? (Unity)
Oh, why not Ero?
40 replies
CC#
Created by CrossTheLine on 2/7/2023 in #help
✅ Best way to use and compare enums? (Unity)
I see, that's fair enough then
40 replies
CC#
Created by CrossTheLine on 2/7/2023 in #help
✅ Best way to use and compare enums? (Unity)
Hmm, yeah, if I've got an enum in the Cardclass that's based off of poker suits, then do I just import it over via `using CardClass and compare it there?
40 replies
CC#
Created by CrossTheLine on 2/7/2023 in #help
✅ Best way to use and compare enums? (Unity)
Do let me know if there's a better or more efficient way to handle this
40 replies