4 #include <msp/game/component.h>
5 #include <msp/linal/vector.h>
8 class Collider: public Msp::Game::Component
11 using Setup = ColliderSetup;
17 Collider(Msp::Game::Handle<Msp::Game::Entity>, const Setup &);
19 ColliderType get_type() const { return setup.type; }
20 float get_radius() const { return (setup.type==ColliderType::CIRCLE ? setup.radius : 0.0f); }
21 Msp::LinAl::Vector<float, 2> get_size() const { return (setup.type==ColliderType::BOX ? setup.size : Msp::LinAl::Vector<float, 2>()); }