]> git.localhorst.tv Git - blobs.git/blobdiff - src/world/sim.cpp
split creature when it's "ripe" lol
[blobs.git] / src / world / sim.cpp
index 185046d4cfc4eed8e73270513c7568e3a55a9561..b6a198d7365a7336be1d7e224b6fe4aaddd1656b 100644 (file)
@@ -8,8 +8,9 @@
 namespace blobs {
 namespace world {
 
-Simulation::Simulation(Body &r)
+Simulation::Simulation(Body &r, app::Assets &assets)
 : root(r)
+, assets(assets)
 , bodies()
 , planets()
 , suns()
@@ -40,7 +41,7 @@ void Simulation::Tick() {
        constexpr double dt = 0.01666666666666666666666666666666;
        time += dt;
        for (auto body : bodies) {
-               body->Rotation(body->Rotation() + dt * body->AngularMomentum() / body->Inertia());
+               body->Tick(dt);
        }
 }