1
This commit is contained in:
parent
dfee1fc337
commit
34d15e9408
@ -45,6 +45,7 @@
|
||||
#include "custom_battle.h"
|
||||
#include "custom_team.h"
|
||||
#include "custom_member.h"
|
||||
#include "room_agent.h"
|
||||
|
||||
#include "mt/Param.h"
|
||||
#include "mt/Hero.h"
|
||||
@ -124,6 +125,8 @@ void Room::Init()
|
||||
air_drop_ = std::make_shared<AirDrop>(this);
|
||||
air_raid_ = std::make_shared<AirRaid>(this);
|
||||
batch_sync_ = std::make_shared<BatchSync>(this);
|
||||
room_agent_ = behaviac::Agent::Create<RoomAgent>();
|
||||
room_agent_->SetRoom(this);
|
||||
|
||||
CreateSpawnPoints();
|
||||
CreateWorldObjects();
|
||||
|
@ -281,7 +281,7 @@ public:
|
||||
int GetMobaLeftTime();
|
||||
Team* GetMobaTeamA() { return moba_team_a_; }
|
||||
Team* GetMobaTeamB() { return moba_team_b_; }
|
||||
RoomAgent* GetRoomAgent() { return room_agent_.get(); }
|
||||
RoomAgent* GetRoomAgent() { return room_agent_; }
|
||||
|
||||
private:
|
||||
void ShuaAndroid();
|
||||
@ -440,7 +440,7 @@ private:
|
||||
Team* moba_team_a_ = nullptr;
|
||||
Team* moba_team_b_ = nullptr;
|
||||
|
||||
std::shared_ptr<RoomAgent> room_agent_;
|
||||
RoomAgent* room_agent_;
|
||||
|
||||
friend class Incubator;
|
||||
friend class Team;
|
||||
|
@ -7,7 +7,6 @@
|
||||
|
||||
RoomAgent::RoomAgent():BaseAgent()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
RoomAgent::~RoomAgent()
|
||||
@ -59,8 +58,3 @@ bool RoomAgent::IsGameOver()
|
||||
{
|
||||
return room_->IsGameOver();
|
||||
}
|
||||
|
||||
void RoomAgent::SetRoom(Room* room)
|
||||
{
|
||||
room_ = room;
|
||||
}
|
||||
|
@ -23,7 +23,8 @@ public:
|
||||
HeroAgent* FindHero(int hero_uniid);
|
||||
|
||||
bool IsGameOver();
|
||||
void SetRoom(Room* room);
|
||||
void SetRoom(Room* room) { room_ = room; }
|
||||
virtual Room* GetRoom() { return room_; }
|
||||
|
||||
private:
|
||||
Room* room_ = nullptr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user