EchoesOfFate
A game for our COMP315 Project
 
Loading...
Searching...
No Matches
ChapterOneState.h
Go to the documentation of this file.
1#pragma once
2#include "State.h"
3
4#include "Map.h"
5#include "Camera.h"
6#include "Player.h"
7#include "NPC.h";
8
9
10class ChapterOneState : public State
11{
12public:
14 ChapterOneState(sf::RenderWindow& window);
16
17 void update(sf::RenderWindow& window, StateManager& stateManager) override;
18 void render(sf::RenderWindow& window) override;
19 std::vector<sf::Texture>* textures;
20 std::vector<std::string>* filepaths;
21 std::vector<sf::Sprite>* sprites;
22
23private:
24 std::shared_ptr<Map> map;
25 std::shared_ptr<Camera> camera;
26 Player player;
27 std::unique_ptr<Interactable> item;
28 std::vector<std::unique_ptr<NPC>> npcs;
29
30 sf::Clock clock;
31 float frameTime;
32};
33
std::vector< std::string > * filepaths
Definition ChapterOneState.h:20
void render(sf::RenderWindow &window) override
Renders current state.
Definition ChapterOneState.cpp:79
std::vector< sf::Sprite > * sprites
Definition ChapterOneState.h:21
ChapterOneState(sf::RenderWindow &window)
Constructor/Destructor.
Definition ChapterOneState.cpp:7
void update(sf::RenderWindow &window, StateManager &stateManager) override
Used for handling input and game updates.
Definition ChapterOneState.cpp:44
std::vector< sf::Texture > * textures
Definition ChapterOneState.h:19
~ChapterOneState()
Handle inputs.
Definition ChapterOneState.cpp:41
Definition Player.h:17
Definition State.h:16
All the possible states included here to make switching easier.
Definition StateManager.h:14