Jamie Slowgrove - PGG Assignment 2
 All Classes Namespaces Files Functions Variables Typedefs Macros
MainMenu.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <SDL.h>
4 #include <iostream>
5 #include <unordered_map>
6 #include <vector>
7 #include <time.h>
8 #include "Utilities.h"
9 #include "State.h"
10 #include "StateManager.h"
11 #include "Audio.h"
12 #include "Camera.h"
13 #include "MenuEntity.h"
14 #include "MainMenuUI.h"
15 #include "LoadingScreen.h"
16 #include "ParticleEffect.h"
17 
23 class MainMenu : public State
24 {
25 private:
27  std::unordered_map<std::string, Object*> objects;
29  std::unordered_map<std::string, Shader*> shaders;
39  glm::vec2 mouse;
43  int pressed;
45  std::vector<ParticleEffect*> particleEffects;
46 
50  void loadingScreen();
51 
52 public:
61 
65  ~MainMenu();
66 
71  bool input();
72 
77  void update(float dt);
78 
82  void draw();
83 };
std::vector< ParticleEffect * > particleEffects
Definition: MainMenu.h:45
Creates a State object. Creates a State object to be inherited. DISCLAMER - This is a modified versio...
Definition: State.h:16
MainMenuUI * userInterface
Definition: MainMenu.h:37
Creates a StateManager object. Creates a StateManager object to be inherited. DISCLAMER - This is my ...
Definition: StateManager.h:13
StateManager * stateManager
Definition: State.h:20
Creates an Camera object.
Definition: Camera.h:14
void update(float dt)
Definition: MainMenu.cpp:178
int playKey
Definition: MainMenu.h:41
glm::vec2 mouse
Definition: MainMenu.h:39
SDL_Window * window
Definition: State.h:22
bool input()
Definition: MainMenu.cpp:80
int exitKey
Definition: MainMenu.h:41
int screenHeight
Definition: State.h:26
MenuEntity * sam
Definition: MainMenu.h:33
void draw()
Definition: MainMenu.cpp:204
Creates an MainMenu object that inherits State and runs the MainMenu.
Definition: MainMenu.h:23
std::unordered_map< std::string, Shader * > shaders
Definition: MainMenu.h:29
int screenWidth
Definition: State.h:24
~MainMenu()
Definition: MainMenu.cpp:53
MainMenu(StateManager *stateManager, SDL_Window *window, int screenWidth, int screenHeight)
Definition: MainMenu.cpp:8
Camera * camera
Definition: MainMenu.h:35
int pressed
Definition: MainMenu.h:43
Audio * music
Definition: MainMenu.h:31
int credKey
Definition: MainMenu.h:41
void loadingScreen()
Definition: MainMenu.cpp:223
Creates a MenuEntity that inherits Entity.
Definition: MenuEntity.h:16
A class for the 2D MainMenuUI that inherits UI.
Definition: MainMenuUI.h:14
std::unordered_map< std::string, Object * > objects
Definition: MainMenu.h:27
Creates a Audio object to handle the SDL_Mixer.
Definition: Audio.h:12