35 #ifndef _Pickupable_H__ 36 #define _Pickupable_H__ 71 virtual const std::string& getRepresentationName()
const = 0;
78 {
return this->used_; }
90 {
return this->carrier_; }
102 {
return this->pickedUp_; }
114 {
return this->enabled_; }
121 {
return this->enabled_; }
129 {
return this->enabled_; }
132 bool drop(
bool createSpawner =
true);
135 bool isTarget(
const Identifier* identifier)
const;
139 bool setUsed(
bool used);
140 bool setPickedUp(
bool pickedUp);
146 virtual void preDestroy(
void)
override;
147 virtual void destroyPickup(
void);
148 virtual void carrierDestroyed(
void);
154 { this->enabled_ =
false; }
161 {
return this->beingDestroyed_; }
168 virtual bool createSpawner(
void) = 0;
184 virtual bool reward(
PlayerInfo* player)
override;
bool beingDestroyed_
Is true if the Pickupable is in the process of being destroyed.
Definition: Pickupable.h:180
bool isPickedUp(void) const
Returns whether the Pickupable is currently picked up.
Definition: Pickupable.h:101
An Interface (or more precisely an abstract class) to model and represent different (all kinds of) pi...
Definition: Pickupable.h:60
virtual void changedUsed(void)
Should be called when the Pickupable has transited from used to unused or the other way around...
Definition: Pickupable.h:83
::std::string string
Definition: gtest-port.h:756
PickupCarrier * getCarrier(void)
Get the carrier of the Pickupable.
Definition: Pickupable.h:89
The MetaPickup drops all the PickupCarriers' Pickupables.
This is the class from which all interfaces of the game-logic (not the engine) are derived from...
Definition: OrxonoxInterface.h:50
bool pickedUp_
Whether the Pickupable is currently picked up or not.
Definition: Pickupable.h:173
std::list< Identifier * > targets_
The possible targets of this Pickupable.
Definition: Pickupable.h:178
The MetaPickup destroys all the PickupCarriers' Pickupables.
bool isBeingDestroyed(void)
Check whether the Pickupable is in the process of being destroyed.
Definition: Pickupable.h:160
SUPER_FUNCTION(0, BaseObject, XMLPort, false)
bool isEnabled(void) const
Returns whether the Pickupable is enabled.
Definition: Pickupable.h:128
virtual void changedPickedUp(void)
Should be called when the Pickupable has transited from picked up to dropped or the other way around...
Definition: Pickupable.h:107
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
Declaration of OrxonoxInterface, the base class of all interfaces in Orxonox.
PickupCarrier * carrier_
The PickupCarrier of the Pickupable.
Definition: Pickupable.h:177
The Identifier is used to identify the class of an object and to store information about the class...
Definition: Identifier.h:109
Shared library macros, enums, constants and forward declarations for the orxonox library ...
bool isUsable(void) const
Returns whether the Pickupable can be used.
Definition: Pickupable.h:113
#define _OrxonoxExport
Definition: OrxonoxPrereqs.h:60
Rewardable is an Interface, that can be implemented by any object to enable it to be given as reward ...
Definition: Rewardable.h:50
Definition of the Rewardable class.
bool isUnusable(void) const
Returns whether the Pickupable can be unused.
Definition: Pickupable.h:120
The PickupCarrier interface provides the means, for any class implementing it, to possess Pickupables...
Definition: PickupCarrier.h:68
bool used_
Whether the Pickupable is currently in use or not.
Definition: Pickupable.h:172
void setDisabled(void)
Sets the Pickuapble to disabled.
Definition: Pickupable.h:153
Definition: PlayerInfo.h:39
Definition of all super-function related macros, used to call functions of the base class...
bool enabled_
Whether the Pickupable is enabled or not.
Definition: Pickupable.h:175
virtual void changedCarrier(void)
Should be called when the Pickupable has changed its PickupCarrier.
Definition: Pickupable.h:95
bool isUsed(void) const
Get whether the Pickupable is currently in use or not.
Definition: Pickupable.h:77