feature(foxy) По нажатию клавиши, изменяется состояние бег-простой
This commit is contained in:
@@ -37,8 +37,18 @@ public class Main {
|
||||
while(Keyboard.next()){
|
||||
if(Keyboard.getEventKey() == Keyboard.KEY_LEFT){
|
||||
foxy.setInverse(true);
|
||||
if(Keyboard.getEventKeyState()){
|
||||
foxy.setState(1);
|
||||
} else {
|
||||
foxy.setState(0);
|
||||
}
|
||||
} else if (Keyboard.getEventKey() == Keyboard.KEY_RIGHT){
|
||||
foxy.setInverse(false);
|
||||
if(Keyboard.getEventKeyState()){
|
||||
foxy.setState(1);
|
||||
} else {
|
||||
foxy.setState(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user