resonance 1.0.1
Loading...
Searching...
No Matches
juiceamountmsg.h
Go to the documentation of this file.
1#pragma once
2
3#include "msg/message.h"
4
5class Player;
6
20class JuiceAmountMsg : public Message {
21public:
31 static Message *New();
32
40 virtual Message *Clone();
41
49 virtual int Type();
50
58 virtual const char *GetName() const;
59
67 virtual void PrintExtra(std::ostream &stream) const;
68
79 int GetJuice();
80
93
103
106};
107
118extern int g_nJuiceAmountMsgType;
Event the game passes between a MsgSource and a MsgSink.
Definition juiceamountmsg.h:20
static Message * New()
Produce a default-constructed message on the heap.
virtual const char * GetName() const
Report this message's class name.
virtual int Type()
Report this message's registered identity.
virtual Message * Clone()
Produce a heap copy of this message.
int mMaxJuice
The player's mMaxJuice, clamped by the same site to a maximum of 800.
Definition juiceamountmsg.h:105
int GetJuice()
Report the player's juice.
Player * mPlayer
Player the message is about.
Definition juiceamountmsg.h:102
virtual void PrintExtra(std::ostream &stream) const
Write the player to a diagnostic stream through Player::Print().
float GetJuiceFraction()
Report the player's juice as a fraction of mMaxJuice.
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
int g_nJuiceAmountMsgType
Identity that JuiceAmountMsg::Type() reports.