/** * Triangles * Copyright (C) 2016 POSITIVE MENTAL ATTITUDE * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, version 3 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #pragma once #include #include "Assets.hpp" #include "TrianglesWindow.hpp" #include "Context.hpp" /** * @class State * @author POSITIVE MENTAL ATTITUDE * @date 06/09/16 * @file State.hpp * @brief This is an abstract base state class. */ class State { public: enum { Ongoing = -1, Loading = 0, Menu = 1, Ingame = 2, Empty = 3 }; State(); virtual ~State(); void setContext(Context* context); virtual void init() = 0; virtual void refresh() = 0; virtual void coreThink(const sf::Event& event) = 0; virtual void coreInput() = 0; virtual void coreUpdate(sf::Time delta) = 0; virtual void coreRender(const bool shaders) = 0; const int status() const; protected: Context* _context; int _status; };