EchoesOfFate
A game for our COMP315 Project
 
Loading...
Searching...
No Matches
MainMenuState Class Reference

#include <MainMenuState.h>

Inheritance diagram for MainMenuState:
State

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 ()
 

Constructor & Destructor Documentation

◆ MainMenuState()

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::~MainMenuState ( )

Member Function Documentation

◆ render()

void MainMenuState::render ( sf::RenderWindow & window)
overridevirtual

Renders current state.

Adjust scale

Draw background

Draw enter text

Buttons

Implements State.

◆ update()

void MainMenuState::update ( sf::RenderWindow & window,
StateManager & stateManager )
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.


The documentation for this class was generated from the following files: