2019-11-06 13:36:28 +00:00
|
|
|
|
#ifndef __ALLYCENTER_H__
|
|
|
|
|
#define __ALLYCENTER_H__
|
|
|
|
|
|
|
|
|
|
#include "common.h"
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
|
|
// ǰ<><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
class Observer;
|
|
|
|
|
class Player;
|
|
|
|
|
|
|
|
|
|
// <20><><EFBFBD><EFBFBD>Ŀ<EFBFBD>꣺<EFBFBD><EAA3BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
class AllyCenter
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
AllyCenter();
|
2021-04-04 13:09:08 +00:00
|
|
|
|
virtual ~AllyCenter(){}
|
2019-11-06 13:36:28 +00:00
|
|
|
|
// <20><><EFBFBD><EFBFBD>֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>
|
|
|
|
|
virtual void notify(INFO_TYPE infoType, std::string name) = 0;
|
|
|
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
void join(Observer* player);
|
|
|
|
|
// <20>Ƴ<EFBFBD><C6B3><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
void remove(Observer* player);
|
|
|
|
|
protected:
|
|
|
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>
|
|
|
|
|
std::vector<Observer*>playerList;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// <20><><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF>
|
|
|
|
|
class AllyCenterController :public AllyCenter
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
AllyCenterController();
|
|
|
|
|
// ʵ<><CAB5>֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>
|
|
|
|
|
void notify(INFO_TYPE infoType, std::string name);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif //__ALLYCENTER_H__
|