Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/world_entities/weapons/ammo_container.h @ 6655

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

orxonox/trunk: ammoContainer added

File size: 858 bytes
Line 
1/*!
2 * @file proto_class.h
3 * @brief Definition of ...
4*/
5
6#ifndef _AMMO_CONTAINER_H
7#define _AMMO_CONTAINER_H
8
9#include "base_object.h"
10
11
12// FORWARD DECLARATION
13class Weapon;
14
15#define DEFAULT_MAX_ENERGY 100
16
17//! A class for Storing energy of Projectiles.
18class AmmoContainer : public BaseObject {
19
20 public:
21  AmmoContainer(ClassID projectileType, float maxEnergy = DEFAULT_MAX_ENERGY);
22  virtual ~AmmoContainer();
23
24  ClassID getProjectileType() const { return this->projectileType; };
25
26
27  float increaseEnergy(float energy);
28  float decreaseEnergy(float energy);
29
30  float getMaxEnergy() const { return this->maxEnergy; };
31
32  void increaseMaxEnergy(float increase);
33
34  bool weaponValid(const Weapon* weapon);
35  void fillWeapon(Weapon* weapon);
36
37
38 private:
39   float  energy;
40   float  maxEnergy;
41
42   ClassID projectileType;
43};
44
45#endif /* _AMMO_CONTAINER_H */
Note: See TracBrowser for help on using the repository browser.