diff --git a/.classpath b/.classpath
new file mode 100644
index 0000000..21026e2
--- /dev/null
+++ b/.classpath
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.project b/.project
new file mode 100644
index 0000000..c968209
--- /dev/null
+++ b/.project
@@ -0,0 +1,17 @@
+
+
+ Global-Gam-Jam-2017
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/res/textures/fond.png b/res/textures/fond.png
new file mode 100644
index 0000000..26fac78
Binary files /dev/null and b/res/textures/fond.png differ
diff --git a/src/globalgamejam/game/MainGame.java b/src/globalgamejam/game/MainGame.java
index 91f537a..a3516d6 100644
--- a/src/globalgamejam/game/MainGame.java
+++ b/src/globalgamejam/game/MainGame.java
@@ -1,17 +1,17 @@
package globalgamejam.game;
+import java.awt.Color;
+import java.util.ArrayList;
+
+import globalgamejam.Main;
import globalgamejam.gui.ActionGUI;
import globalgamejam.gui.GUI;
import globalgamejam.gui.GUILabel;
-import globalgamejam.gui.IActionGUI;
-import globalgamejam.input.Input;
-import globalgamejam.render.*;
+import globalgamejam.render.Camera;
+import globalgamejam.tiles.Fond;
import globalgamejam.tiles.TestTile;
import globalgamejam.tiles.Tile;
-import java.awt.*;
-import java.util.ArrayList;
-
/**
* Class created by MrDev023 (Florian RICHER) on 14/01/2017
*/
@@ -25,11 +25,17 @@ public class MainGame extends Game{
@Override
public void init() {
tiles = new ArrayList();
+ Fond fond = new Fond("res/textures/fond.png");
+ fond.getTransform().translate(Main.WIDTH/2, Main.HEIGHT/2, 0);
+ fond.getTransform().scale(Main.WIDTH,Main.HEIGHT, 0);
+ fond.getTransform().rotate(180, 0, 0);
guis = new ArrayList();
TestTile t = new TestTile();
t.getTransform().translate(100,100,0);
t.getTransform().scale(10,10,0);
+ tiles.add(fond);
tiles.add(t);
+
label = new GUILabel("Test");
label.setX(10);
label.setY(10);
@@ -57,7 +63,8 @@ public class MainGame extends Game{
@Override
public void render2D() {
- for(Tile t : tiles)t.render();
+ for(int i = tiles.size() - 1;i >= 0 ;i--)
+ tiles.get(i).render();
}
@@ -72,4 +79,8 @@ public class MainGame extends Game{
guis.clear();
}
+ public void generateEntity(){
+ int nb =3;
+
+ }
}
diff --git a/src/globalgamejam/tiles/Fond.java b/src/globalgamejam/tiles/Fond.java
new file mode 100644
index 0000000..b739881
--- /dev/null
+++ b/src/globalgamejam/tiles/Fond.java
@@ -0,0 +1,11 @@
+package globalgamejam.tiles;
+
+import globalgamejam.render.Texture;
+
+public class Fond extends Tile {
+ public Fond(String path){
+ super();
+
+ super.setTexture(Texture.loadTexture(path));
+ }
+}
diff --git a/src/globalgamejam/tiles/Objet.java b/src/globalgamejam/tiles/Objet.java
new file mode 100644
index 0000000..9d3fd84
--- /dev/null
+++ b/src/globalgamejam/tiles/Objet.java
@@ -0,0 +1,10 @@
+package globalgamejam.tiles;
+
+import globalgamejam.math.Color4f;
+
+public class Objet extends Tile {
+ public Objet(){
+ super();
+ super.setColor(Color4f.GREEN);
+ }
+}