Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

orxonox/trunk: added powerups

File size: 867 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#include "weapons/weapon_manager.h"
12
13/* FORWARD DEFINITION */
14
15class WeaponPowerUp : public PowerUp {
16
17public:
18  WeaponPowerUp();
19  WeaponPowerUp(const TiXmlElement* root);
20  virtual ~WeaponPowerUp ();
21
22  virtual void loadParams(const TiXmlElement* root);
23
24  Weapon* getWeapon();
25  void setWeaponClass(const char* name);
26
27  virtual int writeBytes(const byte* data, int length, int sender);
28  virtual int readBytes(byte* data, int maxLength, int * reciever );
29
30  bool process(WeaponManager* manager);
31
32private:
33  void init();
34  void newWeapon();
35private:
36  Weapon* weapon;
37  const TiXmlElement* weaponXML;
38
39  void createWeapon();
40};
41
42#endif /* _WEAPON_POWER_UP_H */
Note: See TracBrowser for help on using the repository browser.