diff --git a/Megamon-core/assets/tilesets/Test Map.tmx b/Megamon-core/assets/tilesets/Test Map.tmx
new file mode 100644
index 0000000..9a5c007
--- /dev/null
+++ b/Megamon-core/assets/tilesets/Test Map.tmx
@@ -0,0 +1,108 @@
+
+
diff --git a/Megamon-core/assets/tilesets/Tileset1.tsx b/Megamon-core/assets/tilesets/Tileset1.tsx
new file mode 100644
index 0000000..cdfdcbd
--- /dev/null
+++ b/Megamon-core/assets/tilesets/Tileset1.tsx
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/Megamon-core/assets/tilesets/topmanstage.png b/Megamon-core/assets/tilesets/topmanstage.png
new file mode 100644
index 0000000..ce6e896
Binary files /dev/null and b/Megamon-core/assets/tilesets/topmanstage.png differ
diff --git a/Megamon-core/src/sig/megamon/Megamon.java b/Megamon-core/src/sig/megamon/Megamon.java
index 47f927b..37537ba 100644
--- a/Megamon-core/src/sig/megamon/Megamon.java
+++ b/Megamon-core/src/sig/megamon/Megamon.java
@@ -3,32 +3,72 @@ package sig.megamon;
import java.io.File;
import com.badlogic.gdx.ApplicationAdapter;
+import com.badlogic.gdx.ApplicationListener;
import com.badlogic.gdx.Files;
import com.badlogic.gdx.Gdx;
+import com.badlogic.gdx.Input;
+import com.badlogic.gdx.assets.AssetManager;
+import com.badlogic.gdx.assets.loaders.resolvers.InternalFileHandleResolver;
import com.badlogic.gdx.Files.FileType;
import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.graphics.GL20;
+import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.GlyphLayout;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
+import com.badlogic.gdx.maps.tiled.TiledMap;
+import com.badlogic.gdx.maps.tiled.TmxMapLoader;
+import com.badlogic.gdx.maps.tiled.renderers.OrthogonalTiledMapRenderer;
-public class Megamon extends ApplicationAdapter {
+public class Megamon extends ApplicationAdapter{
SpriteBatch batch;
Texture img;
BitmapFont font;
+ //AssetManager assets;
+ TiledMap map;
+ OrthogonalTiledMapRenderer render;
+ OrthographicCamera camera;
+ int x=0,y=0;
@Override
public void create () {
batch = new SpriteBatch();
img = new Texture("megamon_icon64.png");
font = new BitmapFont(Gdx.files.internal("fonts/AgencyFB.fnt"));
+ //assets = new AssetManager();
+
+ /*assets.setLoader(TiledMap.class, new TmxMapLoader(new InternalFileHandleResolver()));
+ assets.load("tilesets/Test Map.tmx",TiledMap.class);
+ map = assets.get("tilesets/Test Map.tmx");*/
+ map = new TmxMapLoader().load("tilesets/Test Map.tmx");
+ render = new OrthogonalTiledMapRenderer(map,1/16f);
+ camera = new OrthographicCamera();
+ camera.setToOrtho(false, 20, 20);
+ //System.out.println("Camera position: "+camera.position);
}
@Override
public void render () {
Gdx.gl.glClearColor(0, 0, 0, 1);
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
+ if (Gdx.input.isKeyPressed(Input.Keys.A)) {
+ x-=1;
+ }
+ if (Gdx.input.isKeyPressed(Input.Keys.W)) {
+ y+=1;
+ }
+ if (Gdx.input.isKeyPressed(Input.Keys.D)) {
+ x+=1;
+ }
+ if (Gdx.input.isKeyPressed(Input.Keys.S)) {
+ y-=1;
+ }
+ camera.position.set(x, y, camera.position.z);
+ System.out.println("Camera position: "+camera.position);
+ camera.update();
+ render.setView(camera);
+ render.render();
batch.begin();
//batch.draw(img, 0, 0);
batch.draw(img, 40, 40, 64, 64);
diff --git a/Megamon-desktop/.project b/Megamon-desktop/.project
index de2c324..3ed2a2e 100644
--- a/Megamon-desktop/.project
+++ b/Megamon-desktop/.project
@@ -18,7 +18,7 @@
assets
2
- PARENT-1-PROJECT_LOC/core/assets
+ C:/Users/Joshua Sigona/git/Megamon/Megamon-core/assets