Archived
0

feature(foxy) Поворот текстуры по направлению движения персонажа

This commit is contained in:
2013-10-09 12:29:21 +04:00
parent 3a0044de32
commit 642a1d8261
2 changed files with 36 additions and 8 deletions

View File

@@ -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();
}