Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2190 in orxonox.OLD for orxonox/trunk/src/player.h


Ignore:
Timestamp:
Jul 17, 2004, 12:11:20 PM (21 years ago)
Author:
bensch
Message:

orxonox/trunk: merged and copied all files from branches/chris into trunk. it all seems to be in propper order.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/player.h

    r2036 r2190  
     1/*!
     2    \file player.h
     3    \brief Implements a basic controllable WorldEntity
     4*/
    15
    26#ifndef PLAYER_H
     
    59#include "world_entity.h"
    610
    7 class ShootLaser;
    8 class ShootRocket;
    9 
    10 
     11//! Basic controllable WorldEntity
    1112class Player : public WorldEntity
    1213{
     14        friend class World;
    1315
    1416 public:
    15   Player ();
     17  Player (bool isFree = false);
    1618  ~Player ();
    1719
    18   /* position of the spacecraft */
    19   float xCor;
    20   float yCor;
    21   float zCor;
     20        virtual void post_spawn ();
     21  virtual void tick (float time);
     22  virtual void hit (WorldEntity* weapon, Vector loc);
     23  virtual void destroy ();
     24  virtual void collide (WorldEntity* other,  Uint32 ownhitflags, Uint32 otherhitflags);
     25        virtual void command (Command* cmd);
    2226 
    23   float collisionRadius;
     27  virtual void draw ();
     28  virtual void get_lookat (Location* locbuf);
    2429
    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);
     30        virtual void left_world ();
    4031
    4132 private:
    42 
    43 
     33        bool bUp, bDown, bLeft, bRight, bAscend, bDescend;
     34        bool bFire;
     35        Vector velocity;
     36        float travel_speed;
     37        float acceleration;
     38       
     39        void move (float time);
     40       
    4441};
    4542
Note: See TracChangeset for help on using the changeset viewer.