add matchmgr
This commit is contained in:
parent
c159871bf9
commit
8c8a330d8c
@ -36,6 +36,7 @@
|
||||
#include "collider.h"
|
||||
|
||||
#include "tracemgr.h"
|
||||
#include "matchmgr.h"
|
||||
|
||||
struct MsgNode
|
||||
{
|
||||
@ -206,6 +207,7 @@ bool App::Init(int argc, char* argv[])
|
||||
uuid.SetMachineId((node_id - 1) * MAX_NODE_ID + instance_id);
|
||||
KillMgr::Instance()->Init();
|
||||
RoomMgr::Instance()->Init();
|
||||
MatchMgr::Instance()->Init();
|
||||
MapMgr::Instance()->Init();
|
||||
PlayerMgr::Instance()->Init();
|
||||
GGListener::Instance()->Init();
|
||||
@ -244,6 +246,7 @@ void App::UnInit()
|
||||
GGListener::Instance()->UnInit();
|
||||
PlayerMgr::Instance()->UnInit();
|
||||
MapMgr::Instance()->UnInit();
|
||||
MatchMgr::Instance()->UnInit();
|
||||
RoomMgr::Instance()->UnInit();
|
||||
KillMgr::Instance()->UnInit();
|
||||
EntityFactory::Instance()->UnInit();
|
||||
|
@ -1,8 +0,0 @@
|
||||
#include "precompile.h"
|
||||
|
||||
#include "match.h"
|
||||
|
||||
void Match::Init()
|
||||
{
|
||||
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
class Room;
|
||||
class Match
|
||||
{
|
||||
public:
|
||||
Room* room = nullptr;
|
||||
|
||||
void Init();
|
||||
|
||||
};
|
13
server/gameserver/matchmgr.cc
Normal file
13
server/gameserver/matchmgr.cc
Normal file
@ -0,0 +1,13 @@
|
||||
#include "precompile.h"
|
||||
|
||||
#include "matchmgr.h"
|
||||
|
||||
void MatchMgr::Init()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void MatchMgr::UnInit()
|
||||
{
|
||||
|
||||
}
|
15
server/gameserver/matchmgr.h
Normal file
15
server/gameserver/matchmgr.h
Normal file
@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
class Room;
|
||||
class MatchMgr : public a8::Singleton<MatchMgr>
|
||||
{
|
||||
|
||||
private:
|
||||
MatchMgr() {};
|
||||
friend class a8::Singleton<MatchMgr>;
|
||||
|
||||
public:
|
||||
void Init();
|
||||
void UnInit();
|
||||
|
||||
};
|
@ -33,7 +33,6 @@
|
||||
#include "mapmgr.h"
|
||||
#include "incubator.h"
|
||||
#include "team.h"
|
||||
#include "match.h"
|
||||
|
||||
const int SHUA_RANGE = 580;
|
||||
|
||||
@ -91,9 +90,6 @@ void Room::Init()
|
||||
incubator_ = new Incubator();
|
||||
incubator_->room = this;
|
||||
incubator_->Init();
|
||||
match_ = new Match();
|
||||
match_->room = this;
|
||||
match_->Init();
|
||||
if (room_type_ == RT_NewBrid && creator_game_times_ <= 0) {
|
||||
CreateLevel0RoomSpecThings();
|
||||
}
|
||||
@ -109,7 +105,6 @@ void Room::UnInit()
|
||||
UnInitDebugInfo();
|
||||
#endif
|
||||
incubator_->UnInit();
|
||||
A8_SAFE_DELETE(match_);
|
||||
A8_SAFE_DELETE(incubator_);
|
||||
timer_attacher.ClearTimerList();
|
||||
xtimer_attacher_.ClearTimerList();
|
||||
|
@ -40,7 +40,6 @@ class Car;
|
||||
class Hero;
|
||||
class Incubator;
|
||||
class Team;
|
||||
class Match;
|
||||
class MapInstance;
|
||||
struct RoomInitInfo;
|
||||
struct ObstacleData
|
||||
@ -378,7 +377,6 @@ private:
|
||||
xtimer_list* auto_jump_timer_ = nullptr;
|
||||
|
||||
Incubator* incubator_ = nullptr;
|
||||
Match* match_ = nullptr;
|
||||
|
||||
bool infinite_bullet_mode_ = false;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user