Move the camera object out of the game map object
TODO: this commit impacts the performance. FPS decreased from ~60 to ~24, it should be immediately fixed.
This commit is contained in:
@@ -9,6 +9,7 @@ import com.bartlomiejpluta.base.core.profiling.fps.FPSMonitor;
|
||||
import com.bartlomiejpluta.base.core.profiling.time.TimeProfilerService;
|
||||
import com.bartlomiejpluta.base.core.ui.Window;
|
||||
import com.bartlomiejpluta.base.core.util.mesh.MeshManager;
|
||||
import com.bartlomiejpluta.base.core.world.camera.Camera;
|
||||
import com.bartlomiejpluta.base.core.world.map.GameMap;
|
||||
import com.bartlomiejpluta.base.core.world.tileset.manager.TileSetManager;
|
||||
import com.bartlomiejpluta.base.game.world.entity.manager.EntityManager;
|
||||
@@ -30,6 +31,8 @@ public class DefaultGameLogic implements GameLogic {
|
||||
private final TimeProfilerService profiler;
|
||||
private final FPSMonitor fpsMonitor;
|
||||
|
||||
private final Camera camera = new Camera();
|
||||
|
||||
private GameMap map;
|
||||
|
||||
@Override
|
||||
@@ -52,7 +55,7 @@ public class DefaultGameLogic implements GameLogic {
|
||||
|
||||
@Override
|
||||
public void render(Window window) {
|
||||
renderer.render(window, map);
|
||||
renderer.render(window, camera, map);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user