2014-05-26 06:34:49 +02:00
|
|
|
#ifndef INGAMESTATE_HPP
|
|
|
|
#define INGAMESTATE_HPP
|
|
|
|
|
|
|
|
#include "State.hpp"
|
|
|
|
|
2014-08-12 22:15:26 +02:00
|
|
|
class PlayerController;
|
2014-05-26 06:34:49 +02:00
|
|
|
|
|
|
|
class IngameState : public State
|
|
|
|
{
|
2014-08-12 22:15:26 +02:00
|
|
|
ViewCamera _look;
|
2014-05-26 06:34:49 +02:00
|
|
|
glm::vec2 _lookAngles;
|
|
|
|
glm::vec3 _movement;
|
2014-12-15 00:21:30 +01:00
|
|
|
float autolookTimer;
|
2014-05-26 06:34:49 +02:00
|
|
|
public:
|
2014-09-16 20:22:43 +02:00
|
|
|
IngameState(RWGame* game, bool test = false);
|
2014-05-26 06:34:49 +02:00
|
|
|
|
2014-07-24 00:57:21 +02:00
|
|
|
void startTest();
|
2014-05-26 06:34:49 +02:00
|
|
|
void spawnPlayerVehicle();
|
|
|
|
|
2014-08-12 22:15:26 +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);
|
2014-08-12 22:15:26 +02:00
|
|
|
|
|
|
|
const ViewCamera& getCamera();
|
2014-05-26 06:34:49 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // INGAMESTATE_HPP
|