From 6f0369435d9e8ed149bb33e4c0e08027ded4b9c3 Mon Sep 17 00:00:00 2001 From: Jonathan Hager Date: Sun, 21 Jun 2020 23:06:36 +0200 Subject: [PATCH] Lol --- core/src/view/Leveleditor.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/src/view/Leveleditor.java b/core/src/view/Leveleditor.java index 70a6366..e50f227 100644 --- a/core/src/view/Leveleditor.java +++ b/core/src/view/Leveleditor.java @@ -7,6 +7,7 @@ package view; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Input; +import com.badlogic.gdx.files.FileHandle; import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.OrthographicCamera; import com.badlogic.gdx.graphics.g2d.BitmapFont; @@ -20,6 +21,8 @@ import com.badlogic.gdx.math.Matrix4; import com.badlogic.gdx.math.Rectangle; import com.badlogic.gdx.math.Polygon; import com.badlogic.gdx.math.Vector2; +import com.badlogic.gdx.utils.Json; + import java.awt.Point; import java.util.ArrayList; import model.Button; @@ -177,7 +180,9 @@ public class Leveleditor{ state = -1; break; case 4: - + Json json = new Json(); + FileHandle file = Gdx.files.local("levels/level2.json"); + file.writeString(json.toJson(level), false); break; } }