#include <MainMenuState.h>
Public Member Functions | |
| MainMenuState (sf::RenderWindow &window) | |
| Constructor/Destructor. | |
| ~MainMenuState () | |
| void | update (sf::RenderWindow &window, StateManager &stateManager) override |
| Used for handling input and game updates. | |
| void | render (sf::RenderWindow &window) override |
| Renders current state. | |
Public Member Functions inherited from State | |
| virtual | ~State () |
| MainMenuState::MainMenuState | ( | sf::RenderWindow & | window | ) |
Constructor/Destructor.
Constructor/Destructor Use the constructor as you would in Main.cpp.
Text
Buttons Set font
Set position
adjustScale(window);
| MainMenuState::~MainMenuState | ( | ) |
|
overridevirtual |
|
overridevirtual |
Used for handling input and game updates.
Handle inputs
if (window.)
adjustScale(window);
Checks input to change to next scene
Replace this with button but keeping for debugging
Stop music
Button functions
Stop music
Updates
Cutscenes
Music
std::cout << "Main Menu" << std::endl;
Enter animation
Occilate the alpha value (opacity) with a sin function to make a fade in fade out effect
Ranges from 0 to 255
Implements State.