45 lines
1.3 KiB
C++
45 lines
1.3 KiB
C++
#include "precompile.h"
|
|
|
|
#include "mt/PveGeminiContent.h"
|
|
|
|
IMPL_TABLE(mt::PveGeminiContent)
|
|
std::map<int, std::vector<const mt::PveGeminiContent*>> mt::PveGeminiContent::mode_hash_;
|
|
|
|
namespace mt
|
|
{
|
|
|
|
void PveGeminiContent::Init1()
|
|
{
|
|
{
|
|
std::vector<std::string> strings;
|
|
a8::Split(enemy_id(), strings, '|');
|
|
for (auto& str : strings) {
|
|
_enemys.push_back(a8::XValue(str));
|
|
}
|
|
{
|
|
auto itr = mode_hash_.find(mode_id());
|
|
if (itr != mode_hash_.end()) {
|
|
itr->second.push_back(this);
|
|
} else {
|
|
mode_hash_[mode_id()] = std::vector<const mt::PveGeminiContent*>({this});
|
|
}
|
|
}
|
|
}
|
|
{
|
|
std::vector<std::string> strings;
|
|
a8::Split(spawn_point(), strings, ',');
|
|
_spawn_point = glm::vec3(
|
|
(float)a8::XValue(strings[0]).GetDouble(),
|
|
6.0f,
|
|
(float)a8::XValue(strings[1]).GetDouble());
|
|
}
|
|
}
|
|
|
|
const std::vector<const mt::PveGeminiContent*>* PveGeminiContent::GetContentsByMode(int mode)
|
|
{
|
|
auto itr = mode_hash_.find(mode);
|
|
return itr != mode_hash_.end() ? &itr->second : nullptr;
|
|
}
|
|
|
|
}
|