resonance 1.0.1
Loading...
Searching...
No Matches
pointamountmsg.h
Go to the documentation of this file.
1#pragma once
2
3#include <iostream>
4
5#include "msg/message.h"
6
7class Player;
8
24class PointAmountMsg : public Message {
25public:
35 static Message *New();
36
44 virtual Message *Clone();
45
53 virtual int Type();
54
62 virtual const char *GetName() const;
63
71 virtual void PrintExtra(std::ostream &stream) const;
72
84 int GetScore();
85
97
99
107};
108
119extern int g_nPointAmountMsgType;
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
Event the game passes between a MsgSource and a MsgSink.
Definition pointamountmsg.h:24
int GetScore()
Report the player's score.
virtual Message * Clone()
Produce a heap copy of this message.
Player * mPlayer
Definition pointamountmsg.h:98
virtual int Type()
Report this message's registered identity.
int mMaxScore
The score ceiling, capped at 800.
Definition pointamountmsg.h:106
virtual const char * GetName() const
Report this message's class name.
virtual void PrintExtra(std::ostream &stream) const
Write the player to a diagnostic stream through Player::Print().
static Message * New()
Produce a default-constructed message on the heap.
float GetScoreFraction()
Report the player's score as a fraction of mMaxScore.
int g_nPointAmountMsgType
Identity that PointAmountMsg::Type() reports.