Added part of collections
This commit is contained in:
parent
f7dcb0b3b1
commit
1a06db9d13
@ -1,7 +1,6 @@
|
|||||||
package com.openeggbert.core.main;
|
package com.openeggbert.core.main;
|
||||||
|
|
||||||
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
|
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
|
||||||
import com.badlogic.gdx.utils.ObjectMap;
|
|
||||||
import com.openeggbert.core.configuration.ConfigDef;
|
import com.openeggbert.core.configuration.ConfigDef;
|
||||||
import com.openeggbert.core.configuration.OpenEggbertDisplayMode;
|
import com.openeggbert.core.configuration.OpenEggbertDisplayMode;
|
||||||
import com.openeggbert.core.gamespace.GameSpace;
|
import com.openeggbert.core.gamespace.GameSpace;
|
||||||
@ -20,6 +19,7 @@ import java.util.List;
|
|||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import com.pixelgamelibrary.api.files.File;
|
import com.pixelgamelibrary.api.files.File;
|
||||||
|
import com.pixelgamelibrary.api.utils.collections.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -35,7 +35,7 @@ public class OpenEggbertGame extends GameAdapter {
|
|||||||
private SpriteBatch batch;
|
private SpriteBatch batch;
|
||||||
private ShapeRenderer shapeRenderer;
|
private ShapeRenderer shapeRenderer;
|
||||||
private BitmapFont font;
|
private BitmapFont font;
|
||||||
private ObjectMap<String, Texture> imageTextures = new ObjectMap<>();
|
private Map<String, Texture> imageTextures = Pixel.utils().collections().objectMap();
|
||||||
private List<Mod> embeddedMods = new ArrayList<>();
|
private List<Mod> embeddedMods = new ArrayList<>();
|
||||||
private int heightInPixels = 480;
|
private int heightInPixels = 480;
|
||||||
private int widthInPixels = 640;
|
private int widthInPixels = 640;
|
||||||
@ -120,7 +120,7 @@ public class OpenEggbertGame extends GameAdapter {
|
|||||||
|
|
||||||
shapeRenderer.dispose();
|
shapeRenderer.dispose();
|
||||||
font.dispose();
|
font.dispose();
|
||||||
for (String key : imageTextures.keys()) {
|
for (String key : imageTextures.keySet()) {
|
||||||
imageTextures.get(key).dispose();
|
imageTextures.get(key).dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -145,7 +145,7 @@ public class OpenEggbertGame extends GameAdapter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void disposeImageTextures() {
|
public void disposeImageTextures() {
|
||||||
for (String key : imageTextures.keys()) {
|
for (String key : imageTextures.keySet()) {
|
||||||
imageTextures.get(key).dispose();
|
imageTextures.get(key).dispose();
|
||||||
imageTextures.remove(key);
|
imageTextures.remove(key);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user