-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSprintGame.h
39 lines (33 loc) · 943 Bytes
/
SprintGame.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*****************************************************************//**
* \file SprintGame.h
* \brief Game mode that users have to race to finish clearing 40L
*
* \author Chau Le
* \date Sept 2023
*********************************************************************/
#pragma once
#ifndef SPRINT_GAME_H
#define SPRINT_GAME_H
#include "GameBase.h"
#include "Button.h"
class SprintGame :
public GameBase
{
private:
sf::Clock timer;
bool hsSaved = false;
sf::Int32 currSprintTime;
public:
SprintGame(StateManager &stateManager, std::string folderPath);
~SprintGame();
// Game Base functions
//************************************************
void tick(const float & dt, sf::RenderWindow& window);
void keyEvent(const float & dt, sf::Event event);
void mouseEvent(const float & dt, sf::RenderWindow& window, sf::Event event);
void render(sf::RenderWindow& window);
private:
void gameOver();
void restart();
};
#endif