diff --git a/assets/Models/skyboxSphere.fbx b/assets/Models/skyboxSphere.fbx new file mode 100644 index 00000000..9068d8ae Binary files /dev/null and b/assets/Models/skyboxSphere.fbx differ diff --git a/assets/Textures/Thumbs.db b/assets/Textures/Thumbs.db new file mode 100644 index 00000000..0b6ab6fc Binary files /dev/null and b/assets/Textures/Thumbs.db differ diff --git a/assets/Textures/default_texture_map.json b/assets/Textures/default_texture_map.json index 48ab4793..1f18263a 100644 --- a/assets/Textures/default_texture_map.json +++ b/assets/Textures/default_texture_map.json @@ -245,6 +245,12 @@ "/Textures/cloudRing.png", "/Textures/cloudRing.png" ] + }, + "Models/skyboxSphere.fbx" : { + "Sphere" : [ + "/Textures/starrySky.png", + "/Textures/starrySky.png" + ] } } } \ No newline at end of file diff --git a/assets/Textures/starrySky.png b/assets/Textures/starrySky.png new file mode 100644 index 00000000..37dc1747 Binary files /dev/null and b/assets/Textures/starrySky.png differ diff --git a/src/main/java/electrosphere/controls/Control.java b/src/main/java/electrosphere/controls/Control.java index c0e71343..7eef2f95 100644 --- a/src/main/java/electrosphere/controls/Control.java +++ b/src/main/java/electrosphere/controls/Control.java @@ -5,6 +5,9 @@ public class Control { boolean isMouse; boolean state; int keyValue; + ControlMethod onPress; + ControlMethod onRelease; + ControlMethod onRepeat; public boolean isIsKey() { return isKey; @@ -32,6 +35,22 @@ public class Control { this.keyValue = keyValue; this.state = false; } + + public void setOnPress(ControlMethod method){ + onPress = method; + } + + public void setOnRelease(ControlMethod method){ + onRelease = method; + } + + public void setOnRepeat(ControlMethod method){ + onRepeat = method; + } + + public interface ControlMethod { + public void execute(); + } } diff --git a/src/main/java/electrosphere/engine/LoadingThread.java b/src/main/java/electrosphere/engine/LoadingThread.java index a049b019..3da839c2 100644 --- a/src/main/java/electrosphere/engine/LoadingThread.java +++ b/src/main/java/electrosphere/engine/LoadingThread.java @@ -523,6 +523,11 @@ public class LoadingThread extends Thread { Globals.skyboxColors.add(new Vector3f(groundR,groundG,groundB)); Globals.skyboxColors.add(new Vector3f(groundR,groundG,groundB)); + //starry sky true skybox + Entity skybox = EntityUtils.spawnDrawableEntity("Models/skyboxSphere.fbx"); + EntityUtils.getRotation(skybox).rotateX((float)(-Math.PI/2.0f)); + EntityUtils.getScale(skybox).mul(2000.0f); + //cloud ring pseudo skybox Entity cloudRing = EntityUtils.spawnDrawableEntity("Models/cloudRing.fbx"); EntityUtils.getRotation(cloudRing).rotateX((float)(-Math.PI/2.0f)); @@ -672,9 +677,9 @@ public class LoadingThread extends Thread { // OpportunisticAttacker.attachToCreature(goblin); Entity shorts = ItemUtils.spawnBasicItem("boots1"); - EntityUtils.getPosition(shorts).set(new Vector3f(2,1,1)); + EntityUtils.getPosition(shorts).set(new Vector3f(2,1,2)); Entity hair = ItemUtils.spawnBasicItem("hairshort1"); - EntityUtils.getPosition(hair).set(new Vector3f(1,1,1)); + EntityUtils.getPosition(hair).set(new Vector3f(2,1,1)); // goblin = CreatureUtils.spawnBasicCreature("Goblin"); // CollisionObjUtils.positionCharacter(goblin, new Vector3f(3, 0, 4));