feature(foxy) Поворот текстуры по направлению движения персонажа
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package ru.dmitriymx.game;
|
||||
|
||||
import org.lwjgl.LWJGLException;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.Display;
|
||||
import org.lwjgl.opengl.DisplayMode;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@@ -33,6 +34,14 @@ public class Main {
|
||||
}
|
||||
|
||||
private void render(){
|
||||
while(Keyboard.next()){
|
||||
if(Keyboard.getEventKey() == Keyboard.KEY_LEFT){
|
||||
foxy.setInverse(true);
|
||||
} else if (Keyboard.getEventKey() == Keyboard.KEY_RIGHT){
|
||||
foxy.setInverse(false);
|
||||
}
|
||||
}
|
||||
|
||||
foxy.render();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user