Пример #1
0
std::shared_ptr<b2dJson> JsonLoader::load()
{
    if (getJson()) {
        throw new std::runtime_error("Already loaded");
    }

    readFromString(filename);
    createSprites();
    triggerFactories();

    return getJson();
}
Пример #2
0
Vector::Vector(const std::string &string) : x(0), y(0) {
	readFromString(string);
}