1
This commit is contained in:
parent
0ff44c0297
commit
71fb01e4dd
@ -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()
|
||||
|
@ -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();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user