std::shared_ptr<b2dJson> JsonLoader::load() { if (getJson()) { throw new std::runtime_error("Already loaded"); } readFromString(filename); createSprites(); triggerFactories(); return getJson(); }
Vector::Vector(const std::string &string) : x(0), y(0) { readFromString(string); }