55 lines
1.4 KiB
C++
55 lines
1.4 KiB
C++
#pragma once
|
|
#include "EngineFrame/Base/Actor.h"
|
|
#include "Actor/Map/GameMap.h"
|
|
#include "Actor/Object/CharacterObject.h"
|
|
class GameTown : public Actor
|
|
{
|
|
public:
|
|
struct MapInfo
|
|
{
|
|
/**地图对象 */
|
|
RefPtr<GameMap> Map;
|
|
/**地图类型 */
|
|
std::string Type;
|
|
};
|
|
|
|
private:
|
|
/**城镇名称 */
|
|
std::string Name_;
|
|
/**进入城镇时的标题Img */
|
|
std::string Entering_Title;
|
|
/**进入城镇时的过场Img */
|
|
std::string Entering_Cutscene;
|
|
/**需要的任务进入条件 */
|
|
int NeedQuestID;
|
|
/**需要的等级进入条件 */
|
|
int NeedLevel;
|
|
/**赛利亚房间编号 */
|
|
int SariaRoomID = -1;
|
|
/**赛丽亚房间生成坐标 */
|
|
VecFPos3 SariaRoomPos;
|
|
|
|
/**地图集合 */
|
|
std::vector<MapInfo> MapList_;
|
|
|
|
/**当前所在地图 */
|
|
int CurMapIndex = -1;
|
|
|
|
public:
|
|
GameTown(/* args */);
|
|
~GameTown();
|
|
|
|
/**通过城镇ID初始化 */
|
|
void Init(int Index);
|
|
|
|
public:
|
|
/**获取当前所在区域 */
|
|
int GetCurAreaIndex() { return CurMapIndex; };
|
|
/**获取区域对象 */
|
|
RefPtr<GameMap> GetArea(int Index) { return MapList_[Index].Map; };
|
|
/**添加角色 (无区域编号 上线进入城镇 或 使用传送时进入城镇 有区域编号 移动进入的)*/
|
|
void AddCharacter(RefPtr<CharacterObject> Chr, int AreaIndex = -2);
|
|
|
|
void OnUpdate(float DeltaTime) override;
|
|
};
|