Swearwolf
12-03-2008, 04:30 PM
So my image bounces, goes up, left and right - but not down?
anyone help lol
if (Key.isDown(Key.LEFT)){
if((_x-5) > (_width/2)) {
_x-=5;
}
}
if (Key.isDown(Key.RIGHT)){
if((_x+5) < ScreenWidth-(_width/2)) {
_x+=5;
}
}
if (Key.isDown(Key.UP)){
if((_y-5) > (_height/2)) {
_y-=5;
}
}
if (Key.isDown(Key.DOWN)){
if((_y+5) < ScreenHeight-(_height/2)) {
_y+=5;
}
}
anyone help lol
if (Key.isDown(Key.LEFT)){
if((_x-5) > (_width/2)) {
_x-=5;
}
}
if (Key.isDown(Key.RIGHT)){
if((_x+5) < ScreenWidth-(_width/2)) {
_x+=5;
}
}
if (Key.isDown(Key.UP)){
if((_y-5) > (_height/2)) {
_y-=5;
}
}
if (Key.isDown(Key.DOWN)){
if((_y+5) < ScreenHeight-(_height/2)) {
_y+=5;
}
}