#include <msp/game/stage.h>
#include "collider.h"
#include "hittable.h"
+#include "physics.h"
using namespace Msp;
{
declare_dependency<HitPoints>(UPDATE);
declare_dependency<DamageSource>(READ_OLD);
+ declare_dependency<Physics>(RUN_AFTER);
observer.observe<Events::Collision>([this](auto &e){ collision(e); });
}
observer(stage.get_event_bus())
{
declare_dependency<Game::Transform>(UPDATE);
- declare_dependency<RigidBody>(UPDATE);
+ declare_dependency<RigidBody>(CHAINED_UPDATE);
declare_dependency<Collider>(READ_OLD);
observer.observe<Game::Events::EntityCreated>([this](auto &e){ entity_added(e); });