Orxonox  0.0.5 Codename: Arcturus
CollectiblePickup.h
Go to the documentation of this file.
1 /*
2  * ORXONOX - the hottest 3D action shooter ever to exist
3  * > www.orxonox.net <
4  *
5  *
6  * License notice:
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21  *
22  * Author:
23  * Damian 'Mozork' Frick
24  * Co-authors:
25  * ...
26  *
27  */
28 
35 #ifndef _CollectiblePickup_H__
36 #define _CollectiblePickup_H__
37 
38 #include "pickup/PickupPrereqs.h"
39 
40 #include "interfaces/Pickupable.h"
41 
42 namespace orxonox {
43 
56  {
57  friend class PickupCollection;
58 
59  public:
61  virtual ~CollectiblePickup();
62 
63  virtual void changedUsed(void) override;
64  virtual void changedPickedUp(void) override;
65 
70  bool isInCollection(void) const
71  { return this->collection_ != nullptr; }
72 
73  private:
74  void wasAddedToCollection(PickupCollection* collection);
75  void wasRemovedFromCollection(void);
76 
78  };
79 }
80 
81 #endif // _CollectiblePickup_H__
#define _PickupExport
Definition: PickupPrereqs.h:60
PickupCollection * collection_
A pointer to the PickupCollection this CollectiblePickup is in.
Definition: CollectiblePickup.h:77
An Interface (or more precisely an abstract class) to model and represent different (all kinds of) pi...
Definition: Pickupable.h:60
bool isInCollection(void) const
Check whether the given CollectiblePickup is par of a PickupCollection.
Definition: CollectiblePickup.h:70
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
The PickupCollection combines different Pickupables (more precisely CollectiblePickups) to a coherent...
Definition: PickupCollection.h:68
The CollectiblePickup class encompasses all Pickupables that can be added to a PickupCollection and t...
Definition: CollectiblePickup.h:55
Shared library macros, enums, constants and forward declarations for the questsystem module ...
Definition of the Pickupable class.