Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/world_entities/power_ups/weapon_power_up.h @ 6695

Last change on this file since 6695 was 6512, checked in by bensch, 18 years ago

orxonox/trunk: loadParams is now virtual.
ALL THE CLASSES HAVE TO CALL

SuperClass::loadParams(root);

isntead of:
static_cast<SuperClass*>(this)→loadParams(root);

which was quite stupid anyways

File size: 808 bytes
Line 
1/*!
2 * @file weapon_power_up.h
3 * @brief A class representing a PowerUp containing a weapon.
4*/
5
6#ifndef _WEAPON_POWER_UP_H
7#define _WEAPON_POWER_UP_H
8
9#include "power_up.h"
10#include "weapons/weapon.h"
11
12/* FORWARD DEFINITION */
13
14class WeaponPowerUp : public PowerUp {
15
16public:
17  WeaponPowerUp();
18  WeaponPowerUp(const TiXmlElement* root);
19  virtual ~WeaponPowerUp ();
20
21  virtual void loadParams(const TiXmlElement* root);
22
23  Weapon* getWeapon();
24  void setWeaponClass(const char* name);
25
26  virtual int writeBytes(const byte* data, int length, int sender);
27  virtual int readBytes(byte* data, int maxLength, int * reciever );
28
29protected:
30  virtual void respawn();
31
32private:
33  void init();
34private:
35  Weapon* weapon;
36  const TiXmlElement* weaponXML;
37
38  void createWeapon();
39};
40
41#endif /* _WEAPON_POWER_UP_H */
Note: See TracBrowser for help on using the repository browser.