aozhiwei a7f08b469f 1
2023-03-07 13:22:44 +08:00

53 lines
1.3 KiB
C++

#pragma once
#include "mt/macro.h"
#include "mtb/Map.h"
namespace mt
{
class MapCollider;
struct WorldObject
{
int object_uniid = 0;
int object_id = 0;
int object_type = 0;
glm::vec3 pos;
glm::vec3 size;
float rotation = 0.0f;
};
DECLARE_ID_TABLE(Map, mtb::Map,
"map@map.json",
"map_id")
public:
std::vector<std::tuple<std::string, int>> template_list_;
int rand_space = 0;
std::vector<int> airdrops_;
std::vector<int> airraids_;
int refresh_robot_min_num = 0;
int refresh_robot_max_num = 0;
int refresh_robot_min_time = 0;
int refresh_robot_max_time = 0;
std::vector<int> buff_list;
glm::vec3 first_safearea_center_;
std::map<int, int> car_num_limit_;
std::vector<int> safearea_list;
std::vector<WorldObject> _world_objects;
MapCollider* collider_info = nullptr;
std::string RandTemplate() const;
int GetCarLimit(int car_id) const;
glm::vec3 GetCenter() const;
int RandSafeArea() const;
bool IsPveMap() const;
void Init1();
void Init2();
private:
void LoadWorldObjects();
};
}