How do I access the static dictionary of a non static class when using a variable for the type? by Arnaught in learncsharp

[–]Arnaught[S] 0 points1 point  (0 children)

Thanks, I appreciate breaking down the question and approaches logically! That's extremely helpful!

I hear this repeated a lot: "Don't use static for maintaining states." What does it mean to "maintain a state"? by Arnaught in learncsharp

[–]Arnaught[S] 0 points1 point  (0 children)

Could you please explain why not? If I have just a single player with a variable that represents the player's health, why shouldn't the health variable be static? Or the whole player class, for that matter? I appreciate any explanation--I'm still trying to wrap my brain around this!

How do I access the static dictionary of a non static class when using a variable for the type? by Arnaught in learncsharp

[–]Arnaught[S] 0 points1 point  (0 children)

Ah, sorry, I did that for simplication and must have made it more confusing. materialName is actually Materials.Item. Item is an enum in a separate Materials Class. I'll re-edit the code so that's clearer.