Computer Science Canada Cases |
Author: | TheFerret [ Wed Mar 10, 2004 7:44 pm ] | ||
Post subject: | Cases | ||
I am using cases to move a thing in programs and I don't know what to have my varriable as... It is the starting of pac man... The variable is called move...
|
Author: | Cervantes [ Wed Mar 10, 2004 8:04 pm ] |
Post subject: | |
hmm.. interesting. If you are simply trying to get user input using Input.KeyDown, you should use if statements to determine whether the specific key is pressed. I don't think it'll let you do it with cases. When you try to put the chars var into the case it gives you an error saying its a bad type for case expression. When you try to put any other var in, it doesn't know what in the world you're talking about when your talking about (KEY_UP_ARROW). |