Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/network/src/world_entities/power_ups/weapon_power_up.h @ 6419

Last change on this file since 6419 was 6419, checked in by rennerc, 18 years ago

some more entities should sync now

File size: 799 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  Weapon* getWeapon();
22  void setWeaponClass(const char* name);
23
24  virtual int writeBytes(const byte* data, int length, int sender);
25  virtual int readBytes(byte* data, int maxLength, int * reciever );
26
27protected:
28  virtual void respawn();
29
30private:
31  void init();
32  void loadParams(const TiXmlElement* root);
33private:
34  Weapon* weapon;
35  const TiXmlElement* weaponXML;
36
37  void createWeapon();
38};
39
40#endif /* _WEAPON_POWER_UP_H */
Note: See TracBrowser for help on using the repository browser.