-
Notifications
You must be signed in to change notification settings - Fork 0
/
TutorialApplication.h
executable file
·121 lines (101 loc) · 3.08 KB
/
TutorialApplication.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
/*
-----------------------------------------------------------------------------
Filename: TutorialApplication.h
-----------------------------------------------------------------------------
This source file is part of the
___ __ __ _ _ _
/___\__ _ _ __ ___ / / /\ \ (_) | _(_)
// // _` | '__/ _ \ \ \/ \/ / | |/ / |
/ \_// (_| | | | __/ \ /\ /| | <| |
\___/ \__, |_| \___| \/ \/ |_|_|\_\_|
|___/
Tutorial Framework (for Ogre 1.9)
http://www.ogre3d.org/wiki/
-----------------------------------------------------------------------------
*/
#ifndef __TutorialApplication_h_
#define __TutorialApplication_h_
#include "BaseApplication.h"
#include "Wordlist.h"
#include <string>
#include <sstream>
#include <btBulletDynamicsCommon.h>
#include <SDL_net.h>
#include <SDL.h>
#include<time.h>
#include "Block.h"
//---------------------------------------------------------------------------
class TutorialApplication : public BaseApplication
{
public:
TutorialApplication(void);
virtual ~TutorialApplication(void);
virtual void startBullet();
virtual void endBullet();
bool isServer;
bool connectionOpened;
bool sceneCreated;
TCPsocket server;
TCPsocket client;
clock_t lastUpdate;
protected:
CEGUI::Window *myImageWindow;
CEGUI::Window *wpmWindow;
CEGUI::Window *speedWindow;
CEGUI::Window *delayWindow;
CEGUI::Window *lifeWindow1;
CEGUI::Window *lifeWindow2;
CEGUI::Window *lifeWindow3;
CEGUI::Window *lifeWindow4;
CEGUI::Window *lifeWindow5;
CEGUI::Window *goWindow;
bool gameEnd;
int dodgeTimer;
clock_t startTime;
//Ogre::Real mSpd;
//Ogre::Real pointTimer;
int scoreCount;
int wordCount;
btScalar rvx;
btScalar rvy;
btScalar rvz;
bool multiplayer;
int obstNum;
int cameraHeight;
bool flipping;
bool sliding;
bool grinding;
bool sideRunning;
bool finished;
bool delay;
double flipSpeed;
std::vector<Block*> blocks;
Ogre::SceneNode* blockNode;
Ogre::Entity* blockEntity;
btCollisionShape* blockShape;
btDefaultMotionState* blockMotionState;
Ogre::AnimationState* mAnimationState1;
Ogre::AnimationState* mAnimationState2;
int playerSpeed;
int gameTimer;
int speedTimer;
CEGUI::Window *typingWord1;
CEGUI::Window *typingWord2;
CEGUI::Window *typedWord1;
CEGUI::Window *typedWord2;
//CEGUI::Window *dodgeInstr;
//CEGUI::Window *fasterInstr;
virtual void createScene(void);
virtual bool frameRenderingQueued(const Ogre::FrameEvent&);
virtual void createViewports();
virtual void gameStep(const Ogre::FrameEvent& fe);
virtual void CEGUI_setup();
virtual void resetGame();
virtual void updateClient();
//virtual bool mouseMoved(const OIS::MouseEvent &me);
virtual bool mousePressed(const OIS::MouseEvent &me,
OIS::MouseButtonID id);
};
//---------------------------------------------------------------------------
#endif // #ifndef __TutorialApplication_h_
//---------------------------------------------------------------------------