Sion Tower (demo técnica) 0.1

/home/david/programacion/iberogre-siontower/siontower/trunk/src/include/state.h

00001 /*
00002  * This file is part of SionTower.
00003  *
00004  * 
00005  * David Saltares Marquez (C) 2011
00006  * <david.saltares@gmail.com>
00007  *
00008  * 
00009  * SionTower examples are free software: you can redistribute it and/or
00010  * modify it under the terms of the GNU General Public License ad
00011  * published by the Free Software Foundation, either version 3 of the
00012  * License, or (at your option) ant later version.
00013  *
00014  * SionTower examples are distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with SionTower examples.  If not, see <http://www.gnu.org/licenses/>.
00021  */
00022 
00023 
00024 #ifndef SIONTOWER_TRUNK_SRC_INCLUDE_STATE_H_
00025 #define SIONTOWER_TRUNK_SRC_INCLUDE_STATE_H_
00026 
00027 
00028 #include <OIS/OIS.h>
00029 #include <OGRE/Ogre.h>
00030 
00031 class StateManager;
00032 
00034 
00042 class State {
00043     public:
00051         State(StateManager* stateManager);
00052 
00058         virtual ~State() {};
00059        
00065         void setStateManager(StateManager* stateManager) {_stateManager = stateManager;};
00066 
00070         virtual void load() {};
00071 
00075         virtual void clear() {};
00076 
00084         virtual void update(Ogre::Real deltaT, bool active) = 0;
00085        
00092         virtual bool keyPressed(const OIS::KeyEvent &arg) {return true;};
00093         
00100         virtual bool keyReleased(const OIS::KeyEvent &arg) {return true;};
00101         
00108         virtual bool mouseMoved(const OIS::MouseEvent &arg) {return true;};
00109         
00116         virtual bool mousePressed(const OIS::MouseEvent &arg, OIS::MouseButtonID id) {return true;};
00117         
00124         virtual bool mouseReleased(const OIS::MouseEvent &arg, OIS::MouseButtonID id) {return true;};
00125 
00126     protected:
00127         // Log
00128         Ogre::Log* _log;
00129 
00130         // Gestor escena
00131         Ogre::SceneManager* _sceneManager;
00132         
00133         StateManager* _stateManager;
00134         bool _loaded;
00135 };
00136 
00137 
00138 #endif  // SIONTOWER_TRUNK_SRC_INCLUDE_STATE_H_
 Todo Clases Archivos Funciones 'typedefs' Enumeraciones