Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/world_entities/test_gun.h @ 3705

Last change on this file since 3705 was 3631, checked in by patrick, 20 years ago

orxonox/trunk: gun can be fired, projectil do not move jet

File size: 1.6 KB
Line 
1/*!
2    \file weapon.h
3    \brief a weapon that a player can use
4
5    A Player has a list of weapons, that can be choosen to shoot projectiles
6    (projectiles.{cc,h}) at ennemies. These weapons can be shooted sequentially
7    or (if able) combined. Therefore you can choose the weapon mode = choose
8    a weapon.
9
10    A weapon is characterized by:
11     o firing-rate: the initial firing rate of a weapon (1/s = Herz)
12     o slowdown-factor: this is a factor d: exp(-d*x), d is element of all positive R. it determines how fast the firing-rate will slow down. if no slowdown: d=0, the bigger d is, the faster the weapon will slow down!
13     o energy-consumption: this determines the energy that has to be used to produce this projectile = costs per projectile
14   
15    Furthermore there are some other attributes, that will help to represent a firing
16    weapon in this world:
17     o sound file/ressource: this is a pointer to the sound-file/ressource. however it may be represented
18     o shooting animation
19     
20*/
21
22
23#ifndef _TEST_GUN_H
24#define _TEST_GUN_H
25
26#include "weapon.h"
27
28class Projectile;
29class Vector;
30class Quaternion;
31
32
33class TestGun : public Weapon
34{
35  friend class World;
36
37 public:
38  TestGun (PNode* parent, Vector* coordinate, Quaternion* direction);
39  virtual ~TestGun ();
40
41  virtual void activate(void);
42  virtual void deactivate(void);
43
44  virtual void fire(void);
45  virtual void hit (WorldEntity* weapon, Vector* loc);
46  virtual void destroy(void);
47 
48  virtual void tick(float time);
49  virtual void weaponIdle(void);
50  virtual void draw(void);
51
52};
53
54#endif /* _TEST_GUN_H */
Note: See TracBrowser for help on using the repository browser.