mirror of
https://github.com/ynerant/Level-Editor.git
synced 2025-06-21 09:58:24 +02:00
Ajouté entièrement l'enregistrement des sprites
This commit is contained in:
@ -1,14 +1,22 @@
|
||||
package galaxyoyo.unknown.editor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import galaxyoyo.unknown.api.editor.sprites.Sprite;
|
||||
|
||||
public class Editor
|
||||
{
|
||||
private final EditorFrame frame;
|
||||
private byte[] bytes;
|
||||
private List<List<Sprite>> sprites = new ArrayList<List<Sprite>>();
|
||||
|
||||
public Editor(byte[] bytes)
|
||||
{
|
||||
frame = new EditorFrame();
|
||||
frame = new EditorFrame(this);
|
||||
this.bytes = bytes;
|
||||
|
||||
getFrame().setVisible(true);
|
||||
}
|
||||
|
||||
public EditorFrame getFrame()
|
||||
@ -25,4 +33,9 @@ public class Editor
|
||||
{
|
||||
this.bytes = bytes;
|
||||
}
|
||||
|
||||
public Sprite getSprite(int x, int y)
|
||||
{
|
||||
return sprites.get(x).get(y);
|
||||
}
|
||||
}
|
||||
|
@ -5,8 +5,12 @@ import javax.swing.JFrame;
|
||||
public class EditorFrame extends JFrame
|
||||
{
|
||||
private static final long serialVersionUID = -2705122356101556462L;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private final Editor editor;
|
||||
|
||||
public EditorFrame()
|
||||
public EditorFrame(Editor editor)
|
||||
{
|
||||
this.editor = editor;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user