| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149 |
- syntax = "proto3";
- option go_package = "/pb";
- package pb;
- //{slgeditor}这个标签是地图编辑器相关。
- //{slgeditor enter=MapDataEXT }
- // 地图数据主消息
- message MapDataEXT {
-
-
- //资源区数据
- //{slgeditor param=MapDataEXT.area_data fill=array from=blocks} 这个是导出区块数据,遍历所有区块导出数据。
- repeated AreaData area_data = 1;
-
- //出生点(key=center,与 res_data 一致)
- //{slgeditor param=MapDataEXT.born_data fill=map from=instances key=center globalTag=BuildingType globalTagVelue=0 } 用对象列表中对象公共属性 BuildingType == 0 的对象填充 map,key 为中心点索引。
- map<int32,BornData> born_data = 2;
-
-
- //资源
- //{slgeditor param=MapDataEXT.res_data fill=map from=instances key=center globalTag=BuildingType globalTagVelue=10 } 用对象列表中对象公共属性 BuildingType == 10 的对象填充列表,
- map<int32,ResData> res_data = 3;
- //备用出生点(key=center,与 res_data 一致)
- //{slgeditor param=MapDataEXT.reserve_born_data fill=map from=instances key=center globalTag=BuildingType globalTagVelue=11 } 用对象列表中对象公共属性 BuildingType == 11 的对象填充 map,key 为中心点索引。
- map<int32,BornData> reserve_born_data = 4;
- //{slgeditor param=MapDataEXT.tiles fill=array from=cells } 用这个标签表示这个数组按NxN格子填充
- //地块(格子)数据数组
- //索引计算公式:index = y * width + x
- repeated TileMap tiles = 5;
-
-
- }
- // 格子数据
- message TileMap {
- //{slgeditor param=TileMap.coord_index src=cell kind=pos} cell这种类型的情况,cell=pos导出格子的位置。
- // 格子索引(行优先顺序)
- // 索引计算公式:index = y * width + x
- // 索引从0开始,最大值为 (width * height - 1)
- int32 coord_index = 1;
- //{slgeditor param=TileMap.is_res_point src=cell kind=buildingtype buildingType=10}// 检测当前格子是否被建筑类型为10的占用(中心点或占地)
- //是否资源点
- bool is_res_point = 2;
-
- //{slgeditor param=TileMap.is_born_point src=cell kind=buildingtype buildingType=0}// 检测当前格子是否被建筑类型为0的占用(中心点或占地)
- //是否出生点
- bool is_born_point = 3;
-
- //{slgeditor param=TileMap.is_reserve_born_point src=cell kind=buildingtype buildingType=11}// 检测当前格子是否被建筑类型为11的占用(中心点或占地)
- //是否备用出生点
- bool is_reserve_born_point = 4;
-
- //{slgeditor param=TileMap.is_monster_point src=cell kind=buildingtype buildingType=12}// 检测当前格子是否被建筑类型为12的占用(中心点或占地)
- //是否怪兽点
- bool is_monster_point = 5;
-
- }
- // 地图基本信息
- message AreaData {
-
- //资源带id
- //{slgeditor param=AreaData.area_id src=block prop=area_id}
- int32 area_id = 1;
-
- //怪物等级
- //{slgeditor param=AreaData.monster_level src=block prop=monster_level}
- int32 monster_level = 2;
-
-
- //怪物 仅导出坐标在当前区块 min_x~max_x、min_y~max_y 范围内的 BuildingType==12 对象
- //{slgeditor param=AreaData.monster_data fill=map from=instances key=center globalTag=BuildingType globalTagVelue=12 filterInBlock=true }
- map<int32,MonsterData> monster_data = 3;
-
-
- //最小值X
- //{slgeditor param=AreaData.min_x src=block prop=min_x}
- int32 min_x = 4;
- //最小值Y
- //{slgeditor param=AreaData.min_y src=block prop=min_y}
- int32 min_y = 5;
- //最大值X
- //{slgeditor param=AreaData.max_x src=block prop=max_x}
- int32 max_x = 6;
- //最大值Y
- //{slgeditor param=AreaData.max_y src=block prop=max_y}
- int32 max_y = 7;
- }
- //出生点数据
- message BornData {
-
- //中心点 换算公式 index = y * width + x
- //{slgeditor param=BornData.center src=instance prop=pos} // 所有Vector2Shoft都映射成 y * width + x
- int32 center = 1;
- //{slgeditor param=BornData.occupied_coords src=instance prop=offsets}
- //占据面积(位置索引的集合),不含子建筑(卫城等)
- repeated int32 occupied_coords = 2;
- //洲id
- //{slgeditor param=BornData.area1 src=instance kind=area areaLevel=1}
- int32 area1 = 3;
-
-
- }
- //资源点
- message ResData {
-
-
-
- //{slgeditor param=ResData.config_id src=instance prop=exportId} // 就是导出Instance的id
- //配置Id
- int32 config_id = 1;
-
-
- //中心点 换算公式 index = y * width + x
- //{slgeditor param=ResData.center src=instance prop=pos} // 所有Vector2Shoft都映射成 y * width + x
- int32 center = 2;
-
- }
- //怪物点
- message MonsterData {
-
-
-
- //{slgeditor param=MonsterData.config_id src=instance prop=exportId} // 就是导出Instance的id
- //配置Id
- int32 config_id = 1;
-
-
- //中心点 换算公式 index = y * width + x
- //{slgeditor param=MonsterData.center src=instance prop=pos} // 所有Vector2Shoft都映射成 y * width + x
- int32 center = 2;
-
- }
-
|