resonance 1.0.1
Loading...
Searching...
No Matches
winmsg.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4
5#include "msg/message.h"
6
7class Player;
8
30class WinMsg : public Message {
31public:
39 }
40
50 static Message *New();
51
59 virtual Message *Clone();
60
68 virtual int Type();
69
77 virtual const char *GetName() const;
78
90 void AddWinner(Player *pPlayer) {
91 mWinners.push_back(pPlayer);
92 }
93
94 std::vector<Player *> mWinners;
95};
96
107extern int g_nWinMsgType;
Base of every event the game passes between a MsgSource and a MsgSink.
Definition message.h:41
One participant in a session, local or remote.
Definition player.h:39
static Message * New()
Produce a default-constructed message on the heap.
virtual int Type()
Report this message's registered identity.
virtual Message * Clone()
Produce a heap copy of this message.
virtual const char * GetName() const
Report this message's class name.
WinMsg()
Construct a message with no winners.
Definition winmsg.h:38
void AddWinner(Player *pPlayer)
Append one winning player.
Definition winmsg.h:90
std::vector< Player * > mWinners
Definition winmsg.h:94
int g_nWinMsgType
Identity that WinMsg::Type() reports.