X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fapp%2Fapp.cpp;h=86c90d83f043d644f83a25fcfecc2b8ce99a0872;hb=79bff420037f150bd6efd2eef08bd06afafeb068;hp=3111091377afe0fd0ccd25fa75b6a18bd5952e45;hpb=745729c1935276e6f49d108a0a465214aa93c3cb;p=blank.git diff --git a/src/app/app.cpp b/src/app/app.cpp index 3111091..86c90d8 100644 --- a/src/app/app.cpp +++ b/src/app/app.cpp @@ -36,7 +36,7 @@ Application::Application(Window &win, const Config &config) , counter() , world(config.world) , interface(config.interface, assets, audio, counter, world) -, test_controller(MakeTestEntity(world)) +, spawner(world) , running(false) { viewport.VSync(config.vsync); } @@ -45,17 +45,6 @@ Application::~Application() { audio.StopAll(); } -Entity &Application::MakeTestEntity(World &world) { - Entity &e = world.AddEntity(); - e.Name("test"); - e.Position({ 0.0f, 0.0f, 0.0f }); - e.Bounds({ { -0.5f, -0.5f, -0.5f }, { 0.5f, 0.5f, 0.5f } }); - e.WorldCollidable(true); - e.SetShape(world.BlockTypes()[1].shape, { 1.0f, 1.0f, 0.0f }); - e.AngularVelocity(glm::quat(glm::vec3{ 0.00001f, 0.000006f, 0.000013f })); - return e; -} - void Application::RunN(size_t n) { Uint32 last = SDL_GetTicks(); @@ -161,7 +150,7 @@ void Application::Handle(const SDL_WindowEvent &event) { void Application::Update(int dt) { counter.EnterUpdate(); interface.Update(dt); - test_controller.Update(dt); + spawner.Update(dt); world.Update(dt); glm::mat4 trans = world.Player().Transform(Chunk::Pos(0, 0, 0));