feat: camera following player

This commit is contained in:
2024-04-18 22:54:09 +07:00
parent 36af656e0d
commit bcd0650aed
10 changed files with 216 additions and 97 deletions

View File

@@ -12,11 +12,13 @@ public static class SystemRegistrations
var healthSystem = new HealthSystem { World = world };
var movementSystem = new MovementSystem { World = world };
var collisionSystem = new CollisionSystem(world);
var systemsGroup = world.CreateSystemsGroup();
systemsGroup.AddSystem(healthSystem);
systemsGroup.AddSystem(movementSystem);
systemsGroup.AddSystem(collisionSystem);
systemsGroup.EnableSystem(movementSystem);
systemsGroup.EnableSystem(healthSystem);
systemsGroup.EnableSystem(collisionSystem);
@@ -28,7 +30,7 @@ public static class SystemRegistrations
var renderSystemsGroup = world.CreateSystemsGroup();
var hpRenreSystem = new HPRenderSystem { World = world };
var ballRenderSystem = new PlayerRenderSystem { World = world };
var cameraSystem = new CameraSystem(world);
var cameraSystem = new CameraSystem() {World = world };
var blockRenderSystem = new BlockRenderSystem(world);
renderSystemsGroup.AddSystem(blockRenderSystem);