Can I please trouble someone for a demo of the usage of GetKeyState?
char *key = GetKeyState(); //Get entire keyboard state
if(key[KEY_RIGHT] == 1) //Test if right key is pressed
{
x = x + 5; //Move actor to right
}
if(key[KEY_LEFT] == 1) //Test if left key is pressed
{
x = x - 5; //Move actor to left
}
Users browsing this forum: No registered users and 1 guest