1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-10-05 08:37:20 +02:00
openrw/rwgame/ingamestate.hpp

41 lines
782 B
C++
Raw Normal View History

2014-05-26 06:34:49 +02:00
#ifndef INGAMESTATE_HPP
#define INGAMESTATE_HPP
#include "State.hpp"
class PlayerController;
2014-05-26 06:34:49 +02:00
class IngameState : public State
{
bool started;
bool test;
ViewCamera _look;
2015-04-01 06:05:21 +02:00
/** Player input */
2014-05-26 06:34:49 +02:00
glm::vec2 _lookAngles;
glm::vec3 _movement;
2015-04-01 06:05:21 +02:00
/** Timer to reset _lookAngles to forward in vehicles */
2014-12-15 00:21:30 +01:00
float autolookTimer;
2014-05-26 06:34:49 +02:00
public:
IngameState(RWGame* game, bool test = false);
2014-05-26 06:34:49 +02:00
void startTest();
void startGame();
2014-05-26 06:34:49 +02:00
/** shortcut for getWorld()->state.player->getCharacter() */
PlayerController* getPlayer();
2014-05-26 06:34:49 +02:00
virtual void enter();
virtual void exit();
virtual void tick(float dt);
2015-02-07 23:55:06 +01:00
virtual void draw(GameRenderer* r);
2014-05-26 06:34:49 +02:00
virtual void handleEvent(const sf::Event& event);
virtual bool shouldWorldUpdate();
const ViewCamera& getCamera();
2014-05-26 06:34:49 +02:00
};
#endif // INGAMESTATE_HPP