diff --git a/GameEngine/src/main/java/gameEngine/ColorController.java b/GameEngine/src/main/java/gameEngine/ColorController.java deleted file mode 100644 index f844d3d..0000000 --- a/GameEngine/src/main/java/gameEngine/ColorController.java +++ /dev/null @@ -1,70 +0,0 @@ -package gameEngine; -import gameEngine.input.*; - -import static org.lwjgl.glfw.GLFW.*; -import static org.lwjgl.opengl.GL11.*; - -public class ColorController implements IGameComponent { - private float red; - private float green; - private float blue; - - public ColorController() { - } - - public void init() { - this.setColor(0.0F, 0.0F, 0.0F); - } - - public void update() { - if (Input.GetKey(GLFW_KEY_R)) { - this.setColor(1.0F, 0.0F, 0.0F); - System.out.println("R"); - } - - if (Input.GetKeyUp(GLFW_KEY_G)) { - this.setColor(0.0F, 1.0F, 0.0F); - System.out.println("G"); - } - - if (Input.GetKeyDown(GLFW_KEY_B)) { - this.setColor(0.0F, 0.0F, 1.0F); - System.out.println("B"); - } - - if (Input.GetMouseButton(0)) { // Left mouse button - setColor(1.0f, 0.0f, 0.0f); // Set color to red - System.out.println("Left Mouse Button Pressed - Red"); - } - if (Input.GetMouseButtonUp(1)) { // Right mouse button - setColor(0.0f, 0.0f, 1.0f); // Set color to blue - System.out.println("Right Mouse Button Pressed - Blue"); - } - if (Input.GetMouseButtonDown(2)) { // Middle mouse button - setColor(0.0f, 1.0f, 0.0f); // Set color to green - System.out.println("Middle Mouse Button Pressed - Green"); - } - - glClearColor(this.getRed(), this.getGreen(), this.getBlue(), 0.0F); - } - - public float getRed() { - return this.red; - } - - public float getGreen() { - return this.green; - } - - public float getBlue() { - return this.blue; - } - - public void setColor(float r, float g, float b) { - this.red = r; - this.green = g; - this.blue = b; - } - - -}