EntityPtr make_box(const std::string &name, EntityManager &mgr) { auto box = mgr.add_entity(name); box->addComponent(std::make_shared<Transform>(*box.get())); box->addComponent(std::make_shared<Health>(*box.get(), mgr)); return box; }
EntityPtr make_bomb(const std::string &name, EntityManager &mgr) { auto bomb = mgr.add_entity(name); bomb->addComponent(std::make_shared<Transform>(*bomb.get())); bomb->addComponent(std::make_shared<Health>(*bomb.get(), mgr)); bomb->addComponent(std::make_shared<Explosive>(*bomb.get(), mgr)); return bomb; }