Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/network/src/lib/network/player_stats.h @ 8014

Last change on this file since 8014 was 8014, checked in by rennerc, 18 years ago

new NetworkGameManager works now

File size: 1.9 KB
Line 
1/*!
2 * @file player_stats.h
3 * @brief Definition of PlayerStats
4 */
5
6#ifndef _PLAYER_STATS_H
7#define _PLAYER_STATS_H
8
9#include "synchronizeable.h"
10#include "playable.h"
11
12#include <string>
13#include <list>
14
15//! A class for storing player information
16class PlayerStats : public Synchronizeable
17{
18
19  public:
20    PlayerStats( const TiXmlElement* root = NULL );
21    PlayerStats( int userId );
22    virtual ~PlayerStats();
23   
24    virtual void varChangeHandler( std::list<int> & id );
25   
26    static PlayerStats * getStats( int userId );
27   
28    inline int getUserId(){ return userId; }
29   
30    inline int getTeamId(){ return teamId; }
31    inline void setTeamId( int teamId ){ this->teamId = teamId; }
32   
33    inline int getScore(){ return score; }
34    inline void setScore( int score ){ this->score = score; }
35   
36    inline int getPlayableClassId(){ return playableClassId; }
37    void setPlayableClassId( int classId ){ this->playableClassId = classId; };
38   
39    inline int getPlayableUniqueId(){ return playableUniqueId; }
40    void setPlayableUniqueId( int uniqueId );
41   
42    inline std::string getModelFileName(){ return modelFileName; }
43    inline void setModelFileName( std::string filename ){ modelFileName = filename; }
44   
45    Playable * getPlayable();
46
47  private:
48    int userId;                //!< userId
49    int teamId;                //!< teamId
50
51    int score;                 //!< users score points
52    int playableClassId;       //!< players playable class id
53    int playableUniqueId;      //!< playable's uniqueId
54    std::string modelFileName; //!< model filename
55
56    Playable * playable;       //!< pointer to players playable
57
58    // handles for SynchronizeableVars
59    int userId_handle;
60    int groupId_handle;
61    int score_handle;
62    int playableClassId_handle;
63    int playableUniqueId_handle;
64    int modelFileName_handle;
65   
66    void init();
67};
68
69#endif /* _PLAYER_STATS_H */
Note: See TracBrowser for help on using the repository browser.