PageRenderTime 25ms CodeModel.GetById 22ms app.highlight 2ms RepoModel.GetById 0ms app.codeStats 0ms

/GUIPanel.h

http://github.com/adamldoyle/Snake
C Header | 29 lines | 24 code | 5 blank | 0 comment | 0 complexity | b0ad1c7c76c30cbb05caad7cfe16b8e1 MD5 | raw file
 1#ifndef GUIPANEL_H
 2#define GUIPANEL_H
 3
 4#include <SFML/Graphics.hpp>
 5#include "Common.h"
 6#include "Snake.h"
 7
 8class GUIPanel : public sf::Drawable
 9{
10    public:
11        GUIPanel(sf::FloatRect rect);
12        virtual ~GUIPanel();
13        void update(Snake& snake);
14        void reset();
15    protected:
16        virtual void Render(sf::RenderTarget& target, sf::Renderer& renderer) const;
17    private:
18        sf::Shape m_background;
19        sf::Shape m_border;
20
21        int m_nPlayerScore;
22        int m_nSnakeLength;
23
24        static const int FOOD_BONUS = 200;
25        static const int TIME_BONUS = 1;
26        static const int PIECES_PER_TIME_BONUS = 5;
27};
28
29#endif // GUIPANEL_H