1
This commit is contained in:
parent
3d9d01a0f1
commit
19f31f7dea
@ -7,7 +7,7 @@ class AndroidAgent : public HeroAgent
|
||||
public:
|
||||
AndroidAgent();
|
||||
|
||||
virtual ~AndroidAgent();
|
||||
virtual ~AndroidAgent() override;
|
||||
|
||||
BEHAVIAC_DECLARE_AGENTTYPE(AndroidAgent, HeroAgent)
|
||||
|
||||
|
@ -5,14 +5,16 @@
|
||||
#include <f8/btmgr.h>
|
||||
|
||||
#include "room.h"
|
||||
#include "perft.h"
|
||||
|
||||
BaseAgent::BaseAgent():behaviac::Agent()
|
||||
{
|
||||
|
||||
++Perf::Instance()->agent_num;
|
||||
}
|
||||
|
||||
BaseAgent::~BaseAgent()
|
||||
{
|
||||
--Perf::Instance()->agent_num;
|
||||
}
|
||||
|
||||
bool BaseAgent::IsGameOver()
|
||||
|
@ -6,6 +6,21 @@
|
||||
#include "base_agent.h"
|
||||
#include "btcontext.h"
|
||||
#include "btevent.h"
|
||||
#include "perft.h"
|
||||
|
||||
BtCoroutine::BtCoroutine(std::shared_ptr<BtContext> context, int id, const char* name)
|
||||
{
|
||||
context_ = context;
|
||||
id_ = id;
|
||||
name_ = name;
|
||||
INIT_LIST_HEAD(&entry);
|
||||
++Perf::Instance()->bt_co_num;
|
||||
}
|
||||
|
||||
BtCoroutine::~BtCoroutine()
|
||||
{
|
||||
--Perf::Instance()->bt_co_num;
|
||||
}
|
||||
|
||||
void BtCoroutine::Abort(long long frameno)
|
||||
{
|
||||
|
@ -17,13 +17,8 @@ class BtCoroutine
|
||||
long long abort_frameno = 0;
|
||||
behaviac::EBTStatus status = behaviac::BT_RUNNING;
|
||||
|
||||
BtCoroutine(std::shared_ptr<BtContext> context, int id, const char* name)
|
||||
{
|
||||
context_ = context;
|
||||
id_ = id;
|
||||
name_ = name;
|
||||
INIT_LIST_HEAD(&entry);
|
||||
}
|
||||
BtCoroutine(std::shared_ptr<BtContext> context, int id, const char* name);
|
||||
virtual ~BtCoroutine();
|
||||
|
||||
const char* GetName() const { return name_; }
|
||||
auto GetContext() { return context_; }
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include "glmhelper.h"
|
||||
#include "pbutils.h"
|
||||
#include "creature.h"
|
||||
#include "perf.h"
|
||||
|
||||
#include "mt/Param.h"
|
||||
#include "mt/Buff.h"
|
||||
@ -27,12 +28,12 @@
|
||||
|
||||
Buff::Buff()
|
||||
{
|
||||
|
||||
++Perf::Instance()->buff_num;
|
||||
}
|
||||
|
||||
Buff::~Buff()
|
||||
{
|
||||
int i = 0;
|
||||
--Perf::Instance()->buff_num;
|
||||
}
|
||||
|
||||
void Buff::Init()
|
||||
|
@ -39,7 +39,7 @@ class Buff
|
||||
std::shared_ptr<std::vector<float>> buff_vars;
|
||||
|
||||
Buff();
|
||||
~Buff();
|
||||
virtual ~Buff();
|
||||
void Init();
|
||||
void UnInit();
|
||||
int GetLeftTime();
|
||||
|
@ -5,14 +5,17 @@
|
||||
#include "human.h"
|
||||
#include "app.h"
|
||||
#include "perfmonitor.h"
|
||||
#include "perft.h"
|
||||
|
||||
Entity::Entity()
|
||||
{
|
||||
entity_weak_ptr_chunk_.Set(this);
|
||||
++Perf::Instance()->entity_num;
|
||||
}
|
||||
|
||||
Entity::~Entity()
|
||||
{
|
||||
--Perf::Instance()->entity_num;
|
||||
}
|
||||
|
||||
void Entity::Initialize()
|
||||
|
@ -21,7 +21,7 @@ class HeroAgent : public BaseAgent
|
||||
public:
|
||||
HeroAgent();
|
||||
|
||||
virtual ~HeroAgent();
|
||||
virtual ~HeroAgent() override;
|
||||
|
||||
BEHAVIAC_DECLARE_AGENTTYPE(HeroAgent, BaseAgent)
|
||||
|
||||
|
@ -9,7 +9,7 @@ class MasterAgent : public BaseAgent
|
||||
public:
|
||||
MasterAgent();
|
||||
|
||||
virtual ~MasterAgent();
|
||||
virtual ~MasterAgent() override;
|
||||
|
||||
BEHAVIAC_DECLARE_AGENTTYPE(MasterAgent, BaseAgent)
|
||||
|
||||
|
@ -9,7 +9,7 @@ class RoomAgent : public BaseAgent
|
||||
public:
|
||||
RoomAgent();
|
||||
|
||||
virtual ~RoomAgent();
|
||||
virtual ~RoomAgent() override;
|
||||
|
||||
BEHAVIAC_DECLARE_AGENTTYPE(RoomAgent, BaseAgent)
|
||||
|
||||
|
@ -9,7 +9,7 @@ class TargetAgent : public BaseAgent
|
||||
public:
|
||||
TargetAgent();
|
||||
|
||||
virtual ~TargetAgent();
|
||||
virtual ~TargetAgent() override;
|
||||
|
||||
BEHAVIAC_DECLARE_AGENTTYPE(TargetAgent, BaseAgent)
|
||||
|
||||
|
@ -9,7 +9,7 @@ class TeamAgent : public BaseAgent
|
||||
public:
|
||||
TeamAgent();
|
||||
|
||||
virtual ~TeamAgent();
|
||||
virtual ~TeamAgent() override;
|
||||
|
||||
BEHAVIAC_DECLARE_AGENTTYPE(TeamAgent, BaseAgent)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user