working game (but bad)
This commit is contained in:
parent
dbb296ff5d
commit
5c65b99604
6 changed files with 89 additions and 12 deletions
|
@ -1,9 +1,12 @@
|
|||
#pragma once
|
||||
|
||||
#include <SFML/Graphics/RectangleShape.hpp>
|
||||
#include <SFML/Graphics/Sprite.hpp>
|
||||
#ifndef BOOK_GAME_HPP
|
||||
#define BOOK_GAME_HPP
|
||||
|
||||
#include "AudioEmitter.hpp"
|
||||
#include <GameData.hpp>
|
||||
#include <SFML/Graphics.hpp>
|
||||
|
||||
class Game {
|
||||
|
@ -15,6 +18,7 @@ public:
|
|||
|
||||
private:
|
||||
void processEvents(AudioEmitter &audioEmitter);
|
||||
void start();
|
||||
void update(sf::Time elapsedTime);
|
||||
void render();
|
||||
|
||||
|
@ -22,12 +26,17 @@ private:
|
|||
|
||||
static const sf::Time TimePerFrame;
|
||||
|
||||
sf::RenderWindow mWindow{sf::VideoMode({640, 480}), "SFML Application"};
|
||||
sf::RenderWindow mWindow{sf::VideoMode({SCREEN_WIDTH, SCREEN_HEIGHT}),
|
||||
"SFML Application"};
|
||||
sf::Texture mTexture;
|
||||
sf::Font mFont;
|
||||
sf::Text mStatisticsText{mFont};
|
||||
sf::Time mStatisticsUpdateTime;
|
||||
|
||||
sf::RectangleShape leftPressZone;
|
||||
sf::RectangleShape middlePressZone;
|
||||
sf::RectangleShape rightPressZone;
|
||||
|
||||
std::size_t mStatisticsNumFrames{0};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue