Level H Engine
Splash.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <SDL.h>
4 #include "State.h"
5 #include "StateManager.h"
6 #include "../Core/Timer.h"
7 
8 
12 class Splash : public State
13 {
14 public:
20  Splash(StateManager* stateManager, SDL_Window* window);
21 
25  ~Splash();
26 
31  bool input();
32 
36  void update();
37 
41  void draw();
42 
43 private:
47  std::string splashSprite;
48 };
Handles timer functions.
Definition: Timer.h:6
Creates a State object to be inherited.
Definition: State.h:13
Timer * splashTimer
The timer keeping the splash screen open.
Definition: Splash.h:45
Creates a StateManager object.
Definition: StateManager.h:9
StateManager * stateManager
A pointer to the state manager.
Definition: State.h:64
SDL_Window * window
The window to display to.
Definition: State.h:66
Splash(StateManager *stateManager, SDL_Window *window)
Constructs the State object.
Definition: Splash.cpp:8
void update()
A function to update the State.
Definition: Splash.cpp:45
void draw()
A function to draw the State to the screen.
Definition: Splash.cpp:60
A State that contains and runs the splash screen.
Definition: Splash.h:12
std::string splashSprite
The splash screen sprite.
Definition: Splash.h:47
bool input()
Handles the State input.
Definition: Splash.cpp:24
~Splash()
Destructs the State object.
Definition: Splash.cpp:16