source: trunk/monsterz/score.h @ 900

Last change on this file since 900 was 740, checked in by sam, 10 years ago

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

  • Property svn:keywords set to Id
File size: 813 bytes
RevLine 
[340]1//
2// Monsterz
3//
4// Copyright: (c) 2005-2011 Sam Hocevar <sam@hocevar.net>
5//   This program is free software; you can redistribute it and/or
6//   modify it under the terms of the Do What The Fuck You Want To
7//   Public License, Version 2, as published by Sam Hocevar. See
8//   http://sam.zoy.org/projects/COPYING.WTFPL for more details.
9//
10
11//
[740]12// The Score class
[340]13// ---------------
14//
15
[740]16#if !defined __MONSTERZ_SCORE_H__
17#define __MONSTERZ_SCORE_H__
[340]18
19#include "monsterz.h"
20
[740]21class ScoreData;
[340]22
[740]23class Score : public Text
[340]24{
25public:
[740]26    Score(int score);
27    virtual ~Score();
[340]28
[740]29    char const *GetName() { return "<score>"; }
[423]30
[740]31    void Add(int points);
[340]32
33protected:
34    virtual void TickGame(float deltams);
35    virtual void TickDraw(float deltams);
36
37private:
[740]38    ScoreData *data;
[340]39};
40
[740]41#endif // __MONSTERZ_SCORE_H__
[340]42
Note: See TracBrowser for help on using the repository browser.