home *** CD-ROM | disk | FTP | other *** search
/ C++ Games Programming / CPPGAMES.ISO / thx / demos / shootout / build / digit.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-02-12  |  425 b   |  23 lines

  1. // ----- digit.h
  2. #ifndef DIGIT_H
  3. #define DIGIT_H
  4.  
  5. #include "theatrix.h"
  6.  
  7. class Digit : public Player    {
  8.     int num;
  9. public:
  10.     Digit(int n = 0) : Player("digits.gfx")
  11.         { num = n; }
  12.     Digit& operator++(int) { num++; return *this; }
  13.     Digit& operator--()    { --num; return *this; }
  14.     int getnum()
  15.         { return num; }
  16.     void update_position()
  17.         { set_imageno(num+1); }
  18.     void setnum(int n)
  19.         { num = n; }
  20. };
  21.  
  22. #endif
  23.