This commit is contained in:
aozhiwei 2022-12-04 13:53:54 +08:00
parent 0ff44c0297
commit 71fb01e4dd
2 changed files with 15 additions and 0 deletions

View File

@ -4,16 +4,27 @@
#include "metamgr.h"
#include "room.h"
#include "app.h"
#include "android_agent.h"
#include "framework/cpp/btmgr.h"
Android::Android():Human()
{
#if 0
++PerfMonitor::Instance()->entity_num[ET_Android];
#endif
agent_ = behaviac::Agent::Create<AndroidAgent>();
if (!agent_) {
abort();
}
}
Android::~Android()
{
if (agent_) {
f8::BtMgr::Instance()->BtDestory(agent_);
agent_ = nullptr;
}
#if 0
--PerfMonitor::Instance()->entity_num[ET_Android];
#endif
@ -74,6 +85,7 @@ void Android::InternalUpdate(int delta_time)
room->grid_service->MoveCreature(this);
return;
}
f8::BtMgr::Instance()->BtExec(agent_);
}
void Android::GiveEquip()

View File

@ -7,6 +7,7 @@ namespace MetaData
class Robot;
}
class AndroidAgent;
class Android : public Human
{
public:
@ -21,6 +22,8 @@ protected:
Android();
private:
AndroidAgent* agent_ = nullptr;
void InternalUpdate(int delta_time);
void RandSkin();