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