Ignore:
Timestamp:
Mar 14, 2011, 2:40:24 AM (10 years ago)
Author:
sam
Message:

monsterz: create a Score class to display the score text and increment it
progressively.

File:
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/monsterz/score.h

    r739 r740  
    1010
    1111//
    12 // The Thumbs class
     12// The Score class
    1313// ---------------
    1414//
    1515
    16 #if !defined __MONSTERZ_THUMBS_H__
    17 #define __MONSTERZ_THUMBS_H__
     16#if !defined __MONSTERZ_SCORE_H__
     17#define __MONSTERZ_SCORE_H__
    1818
    1919#include "monsterz.h"
    2020
    21 class ThumbsData;
     21class ScoreData;
    2222
    23 class Thumbs : public WorldEntity
     23class Score : public Text
    2424{
    2525public:
    26     Thumbs(int npieces);
    27     virtual ~Thumbs();
     26    Score(int score);
     27    virtual ~Score();
    2828
    29     char const *GetName() { return "<thumbs>"; }
     29    char const *GetName() { return "<score>"; }
    3030
    31     void SetMax(int npieces);
    32     void AddCount(int id, int count);
    33     int GetCount(int id);
     31    void Add(int points);
    3432
    3533protected:
     
    3836
    3937private:
    40     ThumbsData *data;
     38    ScoreData *data;
    4139};
    4240
    43 #endif // __MONSTERZ_THUMBS_H__
     41#endif // __MONSTERZ_SCORE_H__
    4442
Note: See TracChangeset for help on using the changeset viewer.