test with Zangief
This commit is contained in:
parent
29685f8e40
commit
bdc2144145
@ -179,6 +179,7 @@ public class Engine {
|
|||||||
lastFrame = System.currentTimeMillis();
|
lastFrame = System.currentTimeMillis();
|
||||||
// Game logic should fit here
|
// Game logic should fit here
|
||||||
|
|
||||||
|
zangief.setTextureWrap(52,2,70,83);
|
||||||
input(zangief, speed);
|
input(zangief, speed);
|
||||||
// input(smiley2, speed);
|
// input(smiley2, speed);
|
||||||
|
|
||||||
@ -214,4 +215,21 @@ public class Engine {
|
|||||||
if (Input.isKeyDown(GLFW.GLFW_KEY_D))token.translate(new Vector3f (speed * 5.0f, 0.0f, 0.0f));
|
if (Input.isKeyDown(GLFW.GLFW_KEY_D))token.translate(new Vector3f (speed * 5.0f, 0.0f, 0.0f));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void input(ObjectGlTex token, int speed) {
|
||||||
|
if (Input.isKeyDown(GLFW.GLFW_KEY_W)) {
|
||||||
|
token.translate(new Vector3f ( 0.0f, speed * 5.0f, 0.0f));
|
||||||
|
}
|
||||||
|
if (Input.isKeyDown(GLFW.GLFW_KEY_A)) {
|
||||||
|
token.translate(new Vector3f (speed *-5.0f, 0.0f, 0.0f));
|
||||||
|
token.setTextureWrap(121,0,57,80);
|
||||||
|
}
|
||||||
|
if (Input.isKeyDown(GLFW.GLFW_KEY_S)) {
|
||||||
|
token.setTextureWrap(161,260,56,59);
|
||||||
|
}
|
||||||
|
if (Input.isKeyDown(GLFW.GLFW_KEY_D)) {
|
||||||
|
token.translate(new Vector3f (speed * 5.0f, 0.0f, 0.0f));
|
||||||
|
token.setTextureWrap(178,0,62,82);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -6,8 +6,6 @@ import engine.graphics.Shader;
|
|||||||
import engine.math.Matrix4f;
|
import engine.math.Matrix4f;
|
||||||
import engine.math.Vector3f;
|
import engine.math.Vector3f;
|
||||||
|
|
||||||
import java.util.Comparator;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -1,11 +1,8 @@
|
|||||||
package engine.object;
|
package engine.object;
|
||||||
|
|
||||||
import engine.math.Primitive;
|
import engine.math.Primitive;
|
||||||
import engine.graphics.Shader;
|
import engine.graphics.*;
|
||||||
import engine.graphics.Texture;
|
|
||||||
import engine.graphics.VertexArray;
|
|
||||||
import engine.math.Matrix4f;
|
import engine.math.Matrix4f;
|
||||||
import engine.math.Vector3f;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
package engine.object;
|
package engine.object;
|
||||||
|
|
||||||
import engine.graphics.Texture;
|
|
||||||
import engine.math.Primitive;
|
|
||||||
import engine.graphics.Shader;
|
import engine.graphics.Shader;
|
||||||
import engine.graphics.VertexArray;
|
import engine.graphics.VertexArray;
|
||||||
|
import engine.math.Primitive;
|
||||||
import engine.math.Matrix4f;
|
import engine.math.Matrix4f;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class ObjectGlTexColor extends ObjectGlTex{
|
public class ObjectGlTexColor extends ObjectGlTex{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user