|
@@ -1,5 +1,6 @@
|
|
package xyz.tbvns.GeometryDash;
|
|
package xyz.tbvns.GeometryDash;
|
|
|
|
|
|
|
|
+import com.badlogic.gdx.graphics.Texture;
|
|
import com.badlogic.gdx.graphics.VertexAttributes;
|
|
import com.badlogic.gdx.graphics.VertexAttributes;
|
|
import com.badlogic.gdx.graphics.g3d.Model;
|
|
import com.badlogic.gdx.graphics.g3d.Model;
|
|
import com.badlogic.gdx.graphics.g3d.ModelCache;
|
|
import com.badlogic.gdx.graphics.g3d.ModelCache;
|
|
@@ -27,13 +28,15 @@ public class LevelUtils {
|
|
modelCache.begin();
|
|
modelCache.begin();
|
|
for (Object object : Object.fromLevel(level)) {
|
|
for (Object object : Object.fromLevel(level)) {
|
|
try {
|
|
try {
|
|
|
|
+ Texture texture = TexturesManager.idTextureMap.get(Integer.parseInt(object.getProperties().get("1")));
|
|
System.out.println(object.getProperties());
|
|
System.out.println(object.getProperties());
|
|
|
|
+ float factor = 120f;
|
|
Model model = new ModelBuilder().createRect(
|
|
Model model = new ModelBuilder().createRect(
|
|
0f, 0f, 0f,
|
|
0f, 0f, 0f,
|
|
- 1f, 0f, 0f,
|
|
|
|
- 1f, 1f, 0f,
|
|
|
|
- 0, 1, 0f,
|
|
|
|
- 0, 0, 0,
|
|
|
|
|
|
+ texture.getWidth() / factor, 0f, 0f,
|
|
|
|
+ texture.getWidth() / factor, texture.getHeight() / factor, 0f,
|
|
|
|
+ 0f, texture.getHeight() / factor, 0f,
|
|
|
|
+ 0f, 0f, 0f,
|
|
TexturesManager.idMaterialMap.get(Integer.parseInt(object.getProperties().get("1"))),
|
|
TexturesManager.idMaterialMap.get(Integer.parseInt(object.getProperties().get("1"))),
|
|
VertexAttributes.Usage.Position | VertexAttributes.Usage.TextureCoordinates
|
|
VertexAttributes.Usage.Position | VertexAttributes.Usage.TextureCoordinates
|
|
);
|
|
);
|