resonance 1.0.1
Loading...
Searching...
No Matches
choosepowerupmsg.h
Go to the documentation of this file.
1#pragma once
2
3#include "msg/message.h"
4
5class Player;
6
21class ChoosePowerupMsg : public Message {
22private:
23 // The three names come from the two collections, the only producers of the message, which
24 // write the selected entry, the owning player, and the selected kind into them in this order.
25 int mIndex; // +0x04
26
27public:
36
46 static Message *New();
47
60 ChoosePowerupMsg(int nIndex, Player *pOwner, int nType);
61
69 virtual Message *Clone();
70
78 virtual int Type();
79
87 virtual const char *GetName() const;
88
96 virtual void PrintExtra(std::ostream &stream) const;
97
99 int mType;
100};
101
112extern int g_nChoosePowerupMsgType;
int g_nChoosePowerupMsgType
Identity that ChoosePowerupMsg::Type() reports.
virtual const char * GetName() const
Report this message's class name.
Player * mOwner
Definition choosepowerupmsg.h:98
ChoosePowerupMsg(int nIndex, Player *pOwner, int nType)
Report a new selection in a player's collection.
ChoosePowerupMsg()
Construct a message with the payload unset.
Definition choosepowerupmsg.h:34
static Message * New()
Produce a default-constructed message on the heap.
virtual int Type()
Report this message's registered identity.
int mType
Definition choosepowerupmsg.h:99
virtual Message * Clone()
Produce a heap copy of this message.
virtual void PrintExtra(std::ostream &stream) const
Write the selected entry to a diagnostic stream as a number.
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