Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

40 lines (33 sloc) 0.603 kb
#include "State.h"
#include "StateStack.h"
State::Context::Context(sf::RenderWindow& window, TextureHolder& textures, FontHolder& fonts, Player& player) :
window(&window),
textures(&textures),
fonts(&fonts),
player(&player)
{
}
State::State(StateStack& stack, Context context) :
stack(&stack),
context(context)
{
}
State::~State()
{
}
void State::requestStackPush(States::ID stateID)
{
stack->pushState(stateID);
}
void State::requestStackPop()
{
stack->popState();
}
void State::requestStateClear()
{
stack->clearStates();
}
State::Context State::getContext() const
{
return context;
}
Jump to Line
Something went wrong with that request. Please try again.