1
This commit is contained in:
parent
1bf985fab0
commit
2f4e6e2f10
@ -14,6 +14,22 @@ namespace mt
|
||||
if (!GetByType(type())) {
|
||||
type_hash_[type()] = this;
|
||||
}
|
||||
if (!boss().empty()) {
|
||||
std::vector<std::string> strings;
|
||||
a8::Split(boss(), strings, ':');
|
||||
if (strings.size() != 5) {
|
||||
abort();
|
||||
}
|
||||
_boss = std::make_shared<std::tuple<glm::vec3, float, int>>
|
||||
(
|
||||
glm::vec3((float)a8::XValue(strings[0]).GetDouble(),
|
||||
(float)a8::XValue(strings[1]).GetDouble(),
|
||||
(float)a8::XValue(strings[2]).GetDouble()
|
||||
),
|
||||
(float)a8::XValue(strings[3]).GetDouble(),
|
||||
a8::XValue(strings[4]).GetInt()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const SafeArea* SafeArea::GetByType(int type)
|
||||
|
@ -12,14 +12,14 @@ namespace mt
|
||||
public:
|
||||
|
||||
void Init1();
|
||||
std::shared_ptr<std::tuple<float, float, float, int>> GetBoss() { return _boss; }
|
||||
std::shared_ptr<std::tuple<glm::vec3, float, int>> GetBoss() const { return _boss; }
|
||||
|
||||
static const SafeArea* GetByType(int type);
|
||||
|
||||
|
||||
private:
|
||||
static std::map<int, const SafeArea*> type_hash_;
|
||||
std::shared_ptr<std::tuple<float, float, float, int>> _boss;
|
||||
std::shared_ptr<std::tuple<glm::vec3, float, int>> _boss;
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user