Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3710 in orxonox.OLD for orxonox/trunk/src/world_entities


Ignore:
Timestamp:
Apr 1, 2005, 2:05:10 PM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: added the TestBullet to framework, made some doxygen, works

Location:
orxonox/trunk/src/world_entities
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/world_entities/projectile.h

    r3708 r3710  
    22    \projectile.h
    33    \brief a projectile, that is been shooted by a weapon
     4
     5    You can use this class to make some shoots, but this isn't the real idea. If you want to just test, if the
     6    shooting funcions work, use the Projectile class. But if you want to implement your own shoots its
     7    different:<br>
     8    Make a new class and derive it from Projectile. To have a weapon work well, reimplement the functions
     9    - void tick()
     10    - void draw()
     11    - void hit() (only if you have working collision detection)
     12    When you have implemented these functions you have just to add the projectiles to your weapon. You ll want
     13    to make this by looking into the function
     14    - Weapon::fire()
     15    there you just change the line:
     16    Projectile* pj = new Projectile();    TO     Projectile* pj = new MyOwnProjectileClass();
     17    and schwups it works... :)
    418*/
    519
     
    3044  virtual void draw ();
    3145
    32  private:
     46 protected:
    3347  //physical attriutes like: force, speed, acceleration etc.
    3448  float speed;                         //!< this is the speed of the projectile
  • orxonox/trunk/src/world_entities/test_bullet.cc

    r3709 r3710  
    3131   \brief standard constructor
    3232*/
    33 TestBullet::TestBullet (Weapon* weapon) : WorldEntity()
     33TestBullet::TestBullet (Weapon* weapon) : Projectile(weapon)
    3434{}
    3535
  • orxonox/trunk/src/world_entities/test_bullet.h

    r3709 r3710  
    77#define _TEST_BULLET_H
    88
    9 #include "world_entity.h"
     9#include "projectile.h"
    1010
    1111class Vector;
  • orxonox/trunk/src/world_entities/test_gun.cc

    r3708 r3710  
    2626#include "world_entity.h"
    2727#include "model.h"
    28 #include "projectile.h"
     28#include "test_bullet.h"
    2929
    3030#include "vector.h"
     
    8989      return;
    9090    }
    91   Projectile* pj = new Projectile(this);
     91  Projectile* pj = new TestBullet(this);
    9292
    9393  pj->setAbsCoor(this->getAbsCoor());
Note: See TracChangeset for help on using the changeset viewer.