Setting custom class/attributes c#
little forward: I wasn't sure on exactly what I'm looking for, I know it's
possible and I know there's a name for it, but I wasn't sure of what to
search to find it. The answer to this may be as simple as directing me to
the right place, which would be much appreciated! Anyway here's what I'm
trying to do. I'd like to set up a new class, say "class1" then I'd like
to have an attribute, lets say "dead" randomly selected, so that I can
create an instance of the class and the following code will work class1
player1 = new class1(); if (player1.dead == true) { //do whatever }
I apologize if I've used the wrong words in my explanation, again I'm not
sure exactly what I"m looking for. Thanks!
No comments:
Post a Comment