Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/world_entities/projectile.h @ 3689

Last change on this file since 3689 was 3683, checked in by patrick, 19 years ago

orxonox/trunk: projectile speed issue: fixed some strange behaveour. still got the problem, that the the projectile have variable relative speeds to the player…

File size: 1.1 KB
RevLine 
[3573]1/*!
2    \projectile.h
3    \brief a projectile, that is been shooted by a weapon
4*/
5
6#ifndef _PROJECTILE_H
7#define _PROJECTILE_H
8
9#include "world_entity.h"
10
[3632]11class Vector;
[3683]12class Weapon;
[3573]13
14class Projectile : public WorldEntity
15{
16  friend class World;
17
18 public:
[3683]19  Projectile (Weapon* weapon);
[3573]20  virtual ~Projectile ();
21
[3632]22  void setFlightDirection(Quaternion* flightDirection);
[3646]23  void setSpeed(float speed);
24  void setTTL(float ttl);
[3632]25
[3578]26  virtual void hit (WorldEntity* weapon, Vector* loc);
27  virtual void destroy ();
28
[3573]29  virtual void tick (float time);
30  virtual void draw ();
31
[3578]32 private:
[3583]33  //physical attriutes like: force, speed, acceleration etc.
[3632]34  float speed;                         //!< this is the speed of the projectile
[3646]35  float currentLifeTime;               //!< this is the time, the projectile exists in this world (incremented by tick)
36  float ttl;                           //!< time to life, after this time, the projectile will garbage collect itself
[3632]37  Vector* flightDirection;             //!< direction in which the shoot flights
[3683]38  Weapon* weapon;                      //!< weapon the shoot belongs to
[3646]39 
[3573]40};
41
42#endif /* _PROJECTILE_H */
Note: See TracBrowser for help on using the repository browser.