This commit is contained in:
aozhiwei 2023-11-15 21:44:24 +08:00
parent 2a1eea9d32
commit ecc44f822b
3 changed files with 43 additions and 0 deletions

View File

@ -16,6 +16,7 @@ class RoomAgent;
class TeamAgent;
class TargetAgent;
class MasterAgent;
class TeammateAgent;
class HeroAgent : public BaseAgent
{
public:
@ -121,6 +122,7 @@ public:
TeamAgent* team_agent = nullptr;
MasterAgent* master_agent = nullptr;
TargetAgent* current_target_agent = nullptr;
TeammateAgent* current_teammate_agent = nullptr;
float task_param0 = 0.0f;
float task_param1 = 0.0f;
float task_param2 = 0.0f;

View File

@ -0,0 +1,20 @@
#include "precompile.h"
#include "teammate_agent.h"
#include "room.h"
#include "creature.h"
TeammateAgent::TeammateAgent():BaseAgent()
{
}
TeammateAgent::~TeammateAgent()
{
}
Room* TeammateAgent::GetRoom()
{
return owner_->room;
}

View File

@ -0,0 +1,21 @@
#pragma once
#include "base_agent.h"
#include "creature.h"
class TeammateAgent : public BaseAgent
{
public:
TeammateAgent();
virtual ~TeammateAgent();
BEHAVIAC_DECLARE_AGENTTYPE(TeammateAgent, BaseAgent)
virtual Room* GetRoom() override;
private:
CreatureWeakPtr target_;
Creature* owner_ = nullptr;
};