resonance 1.0.1
Loading...
Searching...
No Matches
singlepowerupcollection.h
Go to the documentation of this file.
1#pragma once
2
4
5class LocalPlayer;
6class Powerup;
7
30public:
39
47
59 virtual void Add(PowerupType type);
60
70 virtual void SelectRelative(int nDelta);
71
81 virtual void Select(int nIndex);
82
95 virtual void Deploy(int nTrack, int nBar);
96
104 virtual int HasSelection() const;
105
115 virtual void SendState() const;
116
117private:
118 // The stored kind, or -1 for an empty store.
119 int mType; // +0x14
120 Powerup *mPowerup; // +0x18
121 LocalPlayer *mOwner; // +0x1c
122};
Player driven by a controller on this machine.
Definition localplayer.h:44
Base of the thirteen powerups a player can store and deploy.
Definition powerup.h:27
virtual ~SinglePowerupCollection()
Delete the stored powerup.
virtual int HasSelection() const
Report whether a powerup is stored.
SinglePowerupCollection(LocalPlayer *pOwner)
Start with no powerup stored.
virtual void Select(int nIndex)
Do nothing.
virtual void Add(PowerupType type)
Replace the stored powerup with one of the requested kind.
virtual void Deploy(int nTrack, int nBar)
Deploy the stored powerup and discard it.
virtual void SendState() const
Send the stored kind again, for a listener that has just registered.
virtual void SelectRelative(int nDelta)
Do nothing.
PowerupType
Kinds of item the head-up display labels, in the order HudPowerupName() maps them.
Definition hudutil.h:13