Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
State Example
#ifndef IntroApplicationState_HeaderPlusPlus
#define IntroApplicationState_HeaderPlusPlus
#include "Application.hpp"
#include "AppState.hpp"
#include "ChessPlusPlusState.hpp"
namespace chesspp
{
class Application;
class IntroState : public AppState
{
sf::Clock timer;
public:
IntroState(Application &_app, sf::RenderWindow &disp)
: AppState(_app, disp)
{
}
~IntroState()
{
}
void onRender() override
{
if(timer.getElapsedTime().asSeconds() >= 5)
app.changeState<ChessPlusPlusState>(std::ref(app), std::ref(display));
}
void onLButtonPressed(int x, int y)
{
app.changeState<ChessPlusPlusState>(std::ref(app), std::ref(display));
}
};
}
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.