|
If you know how to check whether they press a certain key,
like the arrow keys,
you can just say...
psuedo:
if(They hit the left arrow key)
{
draw bitmap("WalkingLeft.bmp",
CurrentPosition.x, CurrentPosition.y);
}
else if (They hit the RIGHT arrow key)
{
draw bitmap("WalkingRight.bmp",
CurrentPosition.x, CurrentPosition.y);
}
etc...
It really depends on what you are using to display bitmaps to
the screen. What are you using to display the bitmaps?
Your own function? Or just some other's API
(functions)?
----- Original Message -----
Sent: Tuesday, July 11, 2000 1:22
PM
Subject: 2D Movement
Hello fellow programmers.
I'm working on a 2D game with view from above. Can somebody pass me some
code to let the player move in all directions while the character that the
player controls, looks at the direction it's moving at?
Thank you.
|