home *** CD-ROM | disk | FTP | other *** search
/ C++ Games Programming / CPPGAMES.ISO / thx / demos / skyscrap / build / score.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-13  |  624 b   |  29 lines

  1. #ifndef __score_h
  2. #define __score_h
  3.  
  4. #include "object.h"
  5.  
  6. class ScoreBoard : public Object
  7. {
  8.   // data
  9.   private:
  10.   protected:
  11.     int x, y;
  12.     long score;
  13.   public:
  14.   // functions
  15.   private:
  16.   protected:
  17.   public:
  18.     ScoreBoard() { x=y=0, score=0; }
  19.     void Setup( int X, int Y, long InitialScore=0 ) { x=X, y=Y, score=InitialScore; }
  20.     void Reset( long InitialScore=0 ) { score=InitialScore; }
  21.     long GetScore(void) { return score; }
  22.     void add( int points, boolean UpdateScreen=NO );
  23.     virtual void OnDraw(void) {};
  24.     void draw(void);
  25.     void initialize();
  26. };
  27.  
  28. #endif __score_h
  29.