f8/cpp/btmgr.h
aozhiwei 1dbae08b6f 1
2022-12-06 19:22:47 +08:00

30 lines
716 B
C++

#pragma once
#include "behaviac/behaviac.h"
namespace behaviac
{
class Agent;
}
namespace f8
{
class BtMgr : public a8::Singleton<BtMgr>
{
private:
BtMgr() {};
friend class a8::Singleton<BtMgr>;
public:
void Init(const std::string& file_path);
void UnInit();
void SetLogging(bool logging);
bool BtLoad(behaviac::Agent* agent, const char* relative_path, bool force = false);
void BtSetCurrent(behaviac::Agent* agent, const char* relative_path);
behaviac::EBTStatus BtExec(behaviac::Agent* agent);
behaviac::BehaviorTreeTask* BtGetCurrent(behaviac::Agent* agent);
void BtDestory(behaviac::Agent* agent);
};
}