test with Zangief
This commit is contained in:
parent
29685f8e40
commit
bdc2144145
@ -178,7 +178,8 @@ public class Engine {
|
||||
double time = glfwGetTime();
|
||||
lastFrame = System.currentTimeMillis();
|
||||
// Game logic should fit here
|
||||
|
||||
|
||||
zangief.setTextureWrap(52,2,70,83);
|
||||
input(zangief, speed);
|
||||
// input(smiley2, speed);
|
||||
|
||||
@ -207,11 +208,28 @@ public class Engine {
|
||||
}
|
||||
}
|
||||
|
||||
public static void input(ObjectGl token, int speed) {
|
||||
public static void input(ObjectGl 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));
|
||||
if (Input.isKeyDown(GLFW.GLFW_KEY_S))token.translate(new Vector3f ( 0.0f,speed * -5.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.Vector3f;
|
||||
|
||||
import java.util.Comparator;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
@ -1,11 +1,8 @@
|
||||
package engine.object;
|
||||
|
||||
import engine.math.Primitive;
|
||||
import engine.graphics.Shader;
|
||||
import engine.graphics.Texture;
|
||||
import engine.graphics.VertexArray;
|
||||
import engine.graphics.*;
|
||||
import engine.math.Matrix4f;
|
||||
import engine.math.Vector3f;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -1,12 +1,10 @@
|
||||
package engine.object;
|
||||
|
||||
import engine.graphics.Texture;
|
||||
import engine.math.Primitive;
|
||||
import engine.graphics.Shader;
|
||||
import engine.graphics.VertexArray;
|
||||
import engine.math.Primitive;
|
||||
import engine.math.Matrix4f;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ObjectGlTexColor extends ObjectGlTex{
|
||||
|
Loading…
x
Reference in New Issue
Block a user