osb/source/game/objects/StarTeleporterObject.cpp
2023-06-20 14:33:09 +10:00

17 lines
435 B
C++

#include "StarTeleporterObject.hpp"
#include "StarJsonExtra.hpp"
namespace Star {
TeleporterObject::TeleporterObject(ObjectConfigConstPtr config, Json const& parameters) : Object(config, parameters) {
setUniqueId(configValue("uniqueId", Uuid().hex()).optString());
}
Vec2F TeleporterObject::footPosition() const {
if (auto footPos = configValue("teleporterFootPosition"))
return jsonToVec2F(footPos);
return Vec2F();
}
}