Importするパッケージが変わってしまっていたのを修正
1 parent f323cdd commit 1418736f7fe85f4698d827ebacf962f7ab35b360
NoranekoFelician authored on 27 Sep
Showing 5 changed files
View
9
GameEngine/src/main/java/Main.java 0 → 100644
import org.example.*;
 
public class Main {
public static void main(String[] args) {
Window window = Window.get();
Swing.swing();
window.run();
}
}
View
14
GameEngine/src/main/java/org/example/ColorController.java
package org.example;
 
import org.lwjgl.opengl.GL11;
import static org.lwjgl.glfw.GLFW.*;
import static org.lwjgl.opengl.GL11.*;
 
public class ColorController implements IGameComponent {
private float red;
private float green;
this.setColor(0.0F, 0.0F, 0.0F);
}
 
public void update() {
if (KeyInput.KeyDown(82)) {
if (KeyInput.KeyDown(GLFW_KEY_R)) {
this.setColor(1.0F, 0.0F, 0.0F);
System.out.println("R");
}
 
if (KeyInput.KeyPress(71)) {
if (KeyInput.KeyPress(GLFW_KEY_G)) {
this.setColor(0.0F, 1.0F, 0.0F);
System.out.println("G");
}
 
if (KeyInput.KeyUp(66)) {
if (KeyInput.KeyUp(GLFW_KEY_B)) {
this.setColor(0.0F, 0.0F, 1.0F);
System.out.println("B");
}
 
if (KeyInput.KeyUp(89)) {
if (KeyInput.KeyUp(GLFW_KEY_Y)) {
this.setColor(1.0F, 1.0F, 0.0F);
System.out.println("Y");
}
 
this.setColor(0.0F, 1.0F, 1.0F);
System.out.println("Custom");
}
 
GL11.glClearColor(this.getRed(), this.getGreen(), this.getBlue(), 0.0F);
glClearColor(this.getRed(), this.getGreen(), this.getBlue(), 0.0F);
}
 
public float getRed() {
return this.red;
View
GameEngine/src/main/java/org/example/KeyInput.java
View
GameEngine/src/main/java/org/example/Main.java 100644 → 0
View
GameEngine/src/main/java/org/example/Window.java