Tinman  1.0
play.h
Go to the documentation of this file.
1 // -*- coding:utf-8; tab-width:4; mode:cpp -*-
2 // Tinman author: Isaac Lacoba Molina
3 // Copyright (C) 2014 ISAAC LACOBA MOLINA
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18 #ifndef PLAY_H
19 #define PLAY_H
20 #include "state.h"
21 
22 #include "session.h"
23 
24 class Play : public State {
25  Ogre::SceneNode* animation_node_;
26  Ogre::Entity* animation_entity_;
27  bool started_;
28 
29  public:
30  typedef std::shared_ptr<Play> shared;
31 
32  Play(std::shared_ptr<Game> game);
33  virtual ~Play();
34 
35  void enter();
36  void update(float delta);
37 
38  private:
39  void config_race();
40  void add_hooks();
41  void create_overlays();
42  void create_car();
43  void destroy_board();
44  void update_overlays();
45 
46  //from: http://stackoverflow.com/a/16606128/4319445
47  std::string to_string_with_precision(const float number, const int n);
48 };
49 
50 #endif
void update(float delta)
Definition: play.cpp:60
void create_overlays()
void config_race()
Definition: play.cpp:45
Ogre::Entity * animation_entity_
Definition: play.h:26
Play(std::shared_ptr< Game > game)
Definition: play.cpp:20
Definition: play.h:24
Ogre::SceneNode * animation_node_
Definition: play.h:25
Definition: state.h:28
void destroy_board()
virtual ~Play()
Definition: play.cpp:23
void create_car()
void enter()
Definition: play.cpp:27
std::shared_ptr< Play > shared
Definition: play.h:30
std::string to_string_with_precision(const float number, const int n)
bool started_
Definition: play.h:27
void add_hooks()
Definition: play.cpp:54
void update_overlays()