Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 30, 2005, 9:40:41 PM (18 years ago)
Author:
snellen
Message:

player.cc and player.h changed (both files in ../src/world_entities)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/spaceshipcontrol/src/world_entities/player.h

    r5500 r5839  
    1010#include "physics_interface.h"
    1111#include "event_listener.h"
     12#include "playable.h"
    1213
    13 template<class T> class tList;
    14 class Weapon;
    15 class WeaponManager;
    16 class Vector;
    17 class Event;
    1814
    1915//! Basic controllable WorldEntity
     
    2319     the player.cc for debug also
    2420*/
    25 class Player : public WorldEntity, public EventListener
     21class Player : public EventListener
    2622{
    27   friend class World;
    2823
    2924  public:
    3025    Player();
    31     Player(const char* fileName);
    32     Player(const TiXmlElement* root);
    3326    virtual ~Player();
    3427
    3528    void init();
    36     void loadParams(const TiXmlElement* root);
    37 
    38     void addWeapon(Weapon* weapon);
    39     void removeWeapon(Weapon* weapon);
    40 
    41     virtual void postSpawn();
    42     virtual void leftWorld();
    43 
    44     virtual void collidesWith(WorldEntity* entity, const Vector& location);
    45     virtual void tick(float time);
    46     virtual void draw() const;
    4729
    4830    virtual void process(const Event &event);
     
    5032
    5133  private:
    52     void move(float time);
    53     void weaponAction();
     34    Playable* controllable;
    5435
    55     // !! temporary !!
    56     void ADDWEAPON();
    5736
    58   private:
    59     bool                  bUp;                //!< up button pressed.
    60     bool                  bDown;              //!< down button pressed.
    61     bool                  bLeft;              //!< left button pressed.
    62     bool                  bRight;             //!< right button pressed.
    63     bool                  bAscend;            //!< ascend button pressed.
    64     bool                  bDescend;           //!< descend button presses.
    65     bool                  bFire;              //!< fire button pressed.
    66 
    67     WeaponManager*        weaponMan;          //!< the weapon manager: managing a list of weapon to wepaon-slot mapping
    68 
    69     Vector                velocity;           //!< the velocity of the player.
    70     float                 travelSpeed;        //!< the current speed of the player (to make soft movement)
    71     float                 acceleration;       //!< the acceleration of the player.
    7237};
    7338
Note: See TracChangeset for help on using the changeset viewer.