-
Notifications
You must be signed in to change notification settings - Fork 0
/
Game.h
57 lines (48 loc) · 1.19 KB
/
Game.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef _GAME_H_
#define _GAME_H_
#include <MAUtil/Environment.h>
#include "OpenGLHelpers.h"
#include <MAUtil/Map.h>
#include <MAUtil/Vector.h>
#include "MAHeaders.h"
#include "Camera.h"
#include <mavsprintf.h>
#include <MAUtil/Graphics.h>
#include <MAUI/Font.h>
class Player;
class RaceTrack;
class Skybox;
class HoverCraft;
class Game : public MAUtil::PointerListener, public MAUtil::SensorListener
{
public:
Game();
void init();
void render();
void update();
static float getSecondsPerFrame();
static float getFramesPerSecond();
static void setFramesPerSecond(float fps);
private:
void pointerPressEvent(MAPoint2d p) {}
void pointerMoveEvent(MAPoint2d p) {}
void pointerReleaseEvent(MAPoint2d p) {}
void multitouchPressEvent(MAPoint2d p, int touchId);
void multitouchMoveEvent(MAPoint2d p, int touchId);
void multitouchReleaseEvent(MAPoint2d p, int touchId);
void sensorEvent(MASensor a);
void renderView(int x, int y, int w, int h);
GLuint mTexture;
int width, height;
RaceTrack* raceTrack;
HoverCraft* hoverCraft;
Camera trackCamera;
Skybox* skybox;
Player* mPlayer;
float carVelocity;
vec3 mGyroRotation;
vec3 mGyroSpeed;
MAUI::Font* mFont;
bool press;
};
#endif // _GAME_H_