Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2096 in orxonox.OLD for orxonox/branches/chris/src/player.h


Ignore:
Timestamp:
Jul 9, 2004, 11:14:42 AM (21 years ago)
Author:
chris
Message:

orxonox/branches/chris: Messed with the Player class, added stuff here and there, debug world now creates a player and bind IO to it. Added some doxygen tags.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/chris/src/player.h

    r2058 r2096  
    55#include "world_entity.h"
    66
    7 class ShootLaser;
    8 class ShootRocket;
    9 
    10 
    117class Player : public WorldEntity
    128{
     9        friend class World;
    1310
    1411 public:
    15   Player ();
     12  Player (bool isFree);
    1613  ~Player ();
    1714
    18   /* position of the spacecraft */
    19   float xCor;
    20   float yCor;
    21   float zCor;
     15        virtual void post_spawn ();
     16  virtual void tick (float time);
     17  virtual void hit (WorldEntity* weapon, Vector loc);
     18  virtual void destroy ();
     19  virtual void collide (WorldEntity* other,  Uint32 ownhitflags, Uint32 otherhitflags);
     20        virtual void command (Command* cmd);
    2221 
    23   float collisionRadius;
     22  virtual void draw ();
     23  virtual void get_lookat (Location* locbuf);
    2424
    25 
    26   /* this player wanna shoot? so include a ref to ShootLaser */
    27   ShootLaser* shootLaser;
    28   ShootRocket* shootRocket;
    29 
    30   void setPosition(float x, float y, float z);
    31   void getPosition(float* x, float* y, float* z);
    32   void setCollisionRadius(float radius);
    33   void paint();
    34   void goX(float x);
    35   void goY(float y);
    36   void goZ(float x);
    37   void shoot(int n);
    38   //  void addIO(InputOutput *io);
    39   void drawPlayer(void);
     25        virtual void left_world ();
    4026
    4127 private:
    42 
    43 
     28        bool bUp, bDown, bLeft, bRight, bAscend, bDescend;
     29        bool bFire;
     30        Vector velocity;
     31        float travel_speed;
     32        float acceleration;
     33       
     34        void move (float time);
     35       
    4436};
    4537
Note: See TracChangeset for help on using the changeset viewer.