1
This commit is contained in:
parent
a9b5a74600
commit
8c8f3ff397
@ -121,7 +121,7 @@ void Room::Init()
|
||||
xtimer_attacher_.SetOwner(&xtimer);
|
||||
|
||||
frame_event.room = this;
|
||||
frame_event_data = new FrameEventData();
|
||||
frame_event_data = std::make_shared<FrameEventData>();
|
||||
|
||||
air_drop_ = std::make_shared<AirDrop>(this);
|
||||
air_raid_ = std::make_shared<AirRaid>(this);
|
||||
@ -134,7 +134,7 @@ void Room::Init()
|
||||
CreateSpawnPoints();
|
||||
CreateWorldObjects();
|
||||
ShuaAndroid();
|
||||
incubator_ = new Incubator();
|
||||
incubator_ = std::make_shared(Incubator>();
|
||||
incubator_->room = this;
|
||||
incubator_->Init();
|
||||
sand_table_ = std::make_shared<SandTable>(this);
|
||||
@ -166,8 +166,7 @@ void Room::UnInit()
|
||||
#ifdef DEBUG
|
||||
UnInitDebugInfo();
|
||||
#endif
|
||||
incubator_->UnInit();
|
||||
A8_SAFE_DELETE(incubator_);
|
||||
incubator_ = nullptr;
|
||||
timer_attacher.ClearTimerList();
|
||||
xtimer_attacher_.ClearTimerList();
|
||||
grid_service->ClearRoomData(this);
|
||||
@ -192,7 +191,7 @@ void Room::UnInit()
|
||||
f8::BtMgr::Instance()->BtDestory(room_agent_);
|
||||
room_agent_ = nullptr;
|
||||
team_hash_.clear();
|
||||
A8_SAFE_DELETE(frame_event_data);
|
||||
frame_event_data = nullptr;
|
||||
PerfMonitor::Instance()->alive_count -= alive_count_;
|
||||
}
|
||||
|
||||
|
@ -74,7 +74,7 @@ class Room
|
||||
{
|
||||
public:
|
||||
FrameEvent frame_event;
|
||||
FrameEventData* frame_event_data = nullptr;
|
||||
std::shared_ptr<FrameEventData> frame_event_data;
|
||||
FrameMaker frame_maker;
|
||||
a8::XTimer xtimer;
|
||||
Plane plane;
|
||||
@ -235,7 +235,7 @@ public:
|
||||
RoomObstacle* CreateObstacle(int id, float x, float y, float z,
|
||||
std::shared_ptr<a8::Args> init_args = nullptr);
|
||||
int AllocUniid();
|
||||
Incubator* GetIncubator() { return incubator_;};
|
||||
std::shared_ptr<Incubator>& GetIncubator() { return incubator_;};
|
||||
void GetPartObjectWatchList(Entity* entity, std::vector<Human*>& watch_list);
|
||||
void SetInfiniteBulletMode();
|
||||
bool IsInfiniteBulletMode() { return infinite_bullet_mode_; };
|
||||
@ -410,7 +410,7 @@ private:
|
||||
|
||||
a8::XTimerWp auto_jump_timer_;
|
||||
|
||||
Incubator* incubator_ = nullptr;
|
||||
std::shared_ptr<Incubator> incubator_;
|
||||
std::shared_ptr<SandTable> sand_table_;
|
||||
std::shared_ptr<CustomBattle> custom_battle_;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user