Snake/back-end/guiobjectfactory.cpp

15 lines
300 B
C++
Raw Normal View History

2018-10-11 00:04:52 +03:00
#include "guiobjectfactory.h"
#include "box.h"
2018-10-11 18:09:35 +03:00
#include "utils.h"
2018-10-11 00:04:52 +03:00
2018-10-11 18:09:35 +03:00
GuiObjectFactory::GuiObjectFactory() {}
2018-10-11 00:04:52 +03:00
ItemWorld *GuiObjectFactory::generate(const QString &name) {
ItemWorld *obj = nullptr;
if (name == "Box") {
2018-10-11 18:09:35 +03:00
obj = new Box(-Global::deviceSize.x(), 0);
2018-10-11 00:04:52 +03:00
}
return obj;
}