This commit is contained in:
aozhiwei 2023-11-17 16:50:20 +08:00
parent 95a2521293
commit 7e1257f192

View File

@ -17,6 +17,7 @@
#include "team.h"
#include "master_agent.h"
#include "team_agent.h"
#include "teammate_agent.h"
#include "skill.h"
#include "loot.h"
#include "car.h"
@ -35,6 +36,7 @@ HeroAgent::HeroAgent():BaseAgent()
current_target_agent = behaviac::Agent::Create<TargetAgent>();
master_agent = behaviac::Agent::Create<MasterAgent>();
team_agent = behaviac::Agent::Create<TeamAgent>();
current_teammate_agent = behaviac::Agent::Create<TeammateAgent>();
INIT_LIST_HEAD(&coroutines_list_);
}
@ -52,6 +54,10 @@ HeroAgent::~HeroAgent()
f8::BtMgr::Instance()->BtDestory(team_agent);
team_agent = nullptr;
}
{
f8::BtMgr::Instance()->BtDestory(current_teammate_agent);
current_teammate_agent = nullptr;
}
}
void HeroAgent::SetOwner(Creature* owner)